[fpc-devel] 0010465: CsSubComponent component properties not streamed
Michael Van Canneyt
michael at freepascal.org
Sun Dec 23 22:12:01 CET 2007
On Sun, 23 Dec 2007, Martin Schreiber wrote:
> Hi,
>
> Michael Van Canneyt marked my bugreport 10465 with "won't fix", I would like
> to discuss the issue in a broader forum.
> With fixes_2_2 rev. 9006 FPC does not stream published component properties
> where the component has CsSubComponent set if the property component is not
> owned by the streamed component.
> Delphi streams CsSubComponent properties independent of ownership.
> Caused by this change some properties of MSEgui components will be deleted if
> MSEide is compiled with fixes_2_2 >= rev 9006, the users will loose data.
> Sometimes I use in MSEgui components as worker objects in other components
> which should behave as simple TPersistent descendants and not be integrated
> in the ownership system. I achieve the wanted behaviour by creating them with
> a NIL AOwner parameter.
> An example is tsocketclientiochannel where I use a tifisocketclient component
> with CsSubComponent set in order to implement the socket functionality and to
> allow the user to do the socket settings by the object inspector of MSEide.
> Michaels change now forbid this method although it is completely legal in
> Delphi.
>
> Now I have several possibilities:
>
> 1. I can accept Michaels verdict and surrender to use my programming method
> and rewrite the affected MSEgui pieces and introduce an incompatibility with
> current MSEgui projects.
There is no incompatibility:
Just replace the Nil with the owner. Your code will function as it was.
The Owner-Owned relation is in no other location used during streaming,
so you should not worry about that.
Michael.
More information about the fpc-devel
mailing list