Martin Schreiber schreef:
On Monday 16 April 2007 19.17, Mattias Gaertner wrote:
On Mon, 16 Apr 2007 14:56:01 +0200

Does this mean during streaming Assigned(OnClick) is true?
Yes.
But then you need "if [csReading,csWriting]*ComponentState=[] then ",
don't you?


For events which are triggered while streaming only. I use "if not (csdesigning in componentstate) then". The MSEgui events are all protected by tmsecomponent.canevent anyway: "
function tmsecomponent.canevent(const event: tmethod): boolean;
begin
 result:= (event.code <> nil) and (event.data <> nil) and
            (componentstate * [csloading,csdesigning,csdestroying] = []);
end;
"

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.

Vincent

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

Reply via email to