?
Solved

Set the owner

Posted on 2004-10-10
3
Medium Priority
?
270 Views
Last Modified: 2013-11-23
In my vcl I create a Tcollection alike:

constructor TgnCollection.Create(AOwner: TgnVCL);
begin
  inherited Create(TgnCollectionItem);
  FOwner := AOwner;
end;


How to sent my owner to TgnCollectionItem ???
0
Comment
Question by:ginsonic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
LRHGuy earned 2000 total points
ID: 12271164
When you create a collection item, you pass it the collection that it belongs to, like so:

C:=tCollection.Create;
I:=tCollectionItem.Create(C);

In effect, C is the owner of I.

If C has a property of Owner, then I can access that property with  I.Collection.Owner

Is that what you were looking for?
0
 
LVL 9

Author Comment

by:ginsonic
ID: 12271630
I was so close ;) I played with this but don't know whay first time don't work.

Thanks for support !
0
 
LVL 9

Author Comment

by:ginsonic
ID: 12271719
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question