[fpc-devel] Bug in trunk?

Micha Nelissen micha at neli.hopto.org
Fri Mar 28 15:22:06 CET 2008


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



More information about the fpc-devel mailing list