On Monday 16 April 2007 22.24, Vincent Snijders wrote:

> If events are not executed when componentstate is csDesigning, then we
> don't have this problem.
>
> But the LCL does raise events when component state is csDesigning, and
> then this problem occurs. If we were to guard each OnXXX(Self) call with
> CanEvent, then we don't need to change anything in the IDE.
>
While designing in MSEide 1.2  the "code" field of published event properties 
is nil, the "data" field is used to hold an index number into an event list 
where the info about the events in the project is stored. The event list is 
filled while loading the forms and modified due to user settings in the 
object inspector." assigned" returns false for all published event properties 
while designing because "code" is nil.
In order to let TWriter write the events while streaming "code" and "data" 
fields of the published event properties must be swapped and an artificial 
methodtable must be added to the form.
While streaming in designmode the streamed component must not fire published 
events because "code" does not point to real code. Is there any component 
which fires such events? TDataset for example doesn't AFAIK.
It is problematic to fire published event properties while streaming anyway 
because the loading state of the form is undefined while reading.

Martin

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to