[fpc-pascal] csLoading and Create
Martin Friebe
fpc at mfriebe.de
Wed Jan 14 14:25:24 CET 2009
Hi,
If a component is loaded from a stream, then csLoading is set in
ComponentState (or so I thought I understood the concept)
So in my component i do "if not(csLoading in componentState)" ...
However I found this does not work in the constructor Create. csLoading
is only set *after* the Constructor has been called.
(This is unless it is an inline component?).
- TReader does create the object with class.NewInstance (so create is
not yet called)
- the for inlined components it does set csInline, scLoading => for
others it does not set anything
- then the constructor create is called (but csLoading is not set)
- only then does csLoading get set
Is this supposed to be like this? How else can I inside Create check if
the component is loaded from a stream?
Thanks
Martin
More information about the fpc-pascal
mailing list