[Lazarus] Fwd: Need help in streaming components

Howard Page-Clark hdpc at talktalk.net
Sun Dec 14 18:23:39 CET 2014


On 14/12/2014 12:23, Kiên Nguyễn Tiến Trung wrote:
>
> I am trying to streaming. I spent a lot of time but I didn't find the
> proper solution.
>
> I have two classes, TClass1, TClass2. Although the parent of AClass2 is
> AClass1, AClass2 isn't saved into specified file, only AClass1 is.

AClass1 is not the parent of AClass2. The two classes have no 
relationship, certainly not a hierarchical relationship.

You make AClass1 the *owner* (not the *ancestor*) of AClass2 for that 
single instantiation in your program (i.e. responsible for correctly 
freeing the instance).

However, TClass1 and TClass2 are completely unrelated, and know nothing 
about each other's properties.
Perhaps you are looking for something like the attached zipped unit1.pas.

Howard





---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unit1.zip
Type: application/zip
Size: 789 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141214/1152e276/attachment-0003.zip>


More information about the Lazarus mailing list