Set the owner part II
Posted on 2004-10-10
My VCL have a TCollection property. The structure is:
TgnCollection1 = class(TCollection)
constructor TgnCollection1.Create(AOwner: TMyVCL);
TgnCollectionItem1 = class(TCollectionItem)
inherited Create(Collection); // in my case Collection1
FCollection2 := TgnCollection2.Create(Self);
in CollectionItem1 I have a TCollection property, too ( collection in Collection )
TgnCollectionItem2 = class(TCollectionItem)
inherited Create(Collection); // in my case Collection2
Now my problem.
Starting from myVCL I can get the Owner untill the first TCollectionItem with:
How to get the Owner to the last TCollectionItem ?
I wish to know the Owner ( Self .. myVCL ) into TCollectionItem2.