Michael Van Canneyt wrote:
FYI: so before streaming, the "streamer" has to reset the values to their
defaults to stream properly. Unfortenately, there is no function to do this,
and it's usually done in constructor. Therefore streaming twice does not work
properly.

This is not correct.

The default value is the value at create time and remains fixed during the
lifetime of the component. It has no influence on the number of times you stream a component.

Example: suppose a component has been written out that uses the default for a certain property X. Now if you do:

class.X := <some-non-default-value>;
stream.readstream(class);
(class.X = <default-value>) is false, while it should be true.

Micha
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to