[fpc-pascal] csLoading

Vincent Snijders vsnijders at quicknet.nl
Wed Jul 9 23:24:31 CEST 2008


Hi,

This is sequel to this thread of almost two years ago: 
http://lists.freepascal.org/lists/fpc-devel/2006-September/008737.html

Some things changed (e.g. TComponent.Loading has been added), but I stil 
did not find an easy way to fix lazarus bug 7305.

Looking at TReader.ReadComponent I have two questions:
First, why is for inline components csLoading set before the constructor 
is called and why for other components after the constructor is called.
Having csLoading set before the constructor would help me to decide to 
set the default values for the collection or not.

Secondly, why isn't TComponent.Loading called to set the csLoading flag? 
That way it could have been override by component, that needs a 
different state when loading than when just created. Or for what other 
purposes is TComponent.Loading made virtual? IIRC Graeme just needed it 
protected so he could call it.

Vincent



More information about the fpc-pascal mailing list