[fpc-pascal] csLoading and Create

Martin Friebe fpc at mfriebe.de
Thu Jan 15 12:34:47 CET 2009


Graeme Geldenhuys wrote:
> On Wed, Jan 14, 2009 at 3:25 PM, Martin Friebe <fpc at mfriebe.de> wrote:
>   
>> Is this supposed to be like this? How else can I inside Create check if the
>> component is loaded from a stream?
>>     
>
> Could you not use the AfterConstruction() method?  Or is that still to
> early (before ComponentState is set)?
>   
Thanks, I'll investigate this. I s this called if  the component is 
created  by it's owning class>
The "owner" calls within his own create: 
       FSubcomponent := TSubCompnetn.Create(self);  // and this should 
create the default setup

Anyway I found another tip which works well; I can check 
AOwner.ComponetState for csLoading




More information about the fpc-pascal mailing list