[DUG] Storing extra data with a component

Phil Scadden p.scadden at gns.cri.nz
Thu Jun 9 16:27:17 NZST 2005


> TMyComponent = class(TComponent)
> published
>   property Collection:TCollection;
> end;
> 
> as long as Collection is actually a TOwnedCollection with self as the 
> owner and it is a published property
> then the TReader & TWriter of Delphis streaming will stream the data.

Hmm, works well enough to write the component but no go on reading it
because there is nothing which tells the component what descendent
of TOwnedCollection is in the stream; no way for it create the appropriate
type. Looks like I will have to descend the class.

----------------------------------------------------------
Phil Scadden, Institute of Geological and Nuclear Sciences
764 Cumberland St, Private Bag 1930, Dunedin, New Zealand
Ph +64 3 4799663, fax +64 3 477 5232



More information about the Delphi mailing list