Solved

Set the owner

Posted on 2004-10-10
3
264 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
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
LRHGuy earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now