The question is, do I write the main object using WriteComponent and do the
same for each of the objects saved in the TList (to create one streamed
file)? Then, how do I read it back. Do I simply use ReadComponent for the
first object and assume the position of the stream is at the end of the main
object? Then, I can call ReadComponent again for each of the subobjects and
load them into the main objects TList?
Best regards,
Michel
------
http://www.intervalsoftware.com
Envision Image Library
Spider Object Database
Spider Container and Persistent Classes (freeware)
WordShare string localization (freeware)
You need one additional step: after the main object has been streamed, write
the number of items in the list to the stream, then stream the objects in the
list. On read you first read the main component, then the stored item count.
You then loop for the number of items stored, create a new object for each,
read it from stream and add it to the list.
If you use a TCollection and TCollectionItems decendents this is automatic, by
the way, if the main object exposes the collection as a published property.
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Sent using Virtual Access 5.00 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe