[Lazarus] TControl.Click?

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Oct 1 14:33:22 CEST 2011


On Sat, 01 Oct 2011 09:06:05 +0100
Martin <lazarus at mfriebe.de> wrote:

> On 01/10/2011 08:13, Mattias Gaertner wrote:
> > On Sat, 1 Oct 2011 10:08:59 +0300
> > Zaher Dirkey<parmaja at gmail.com>  wrote:
> >
> >> Off your topic
> >> On Sat, Oct 1, 2011 at 9:53 AM, Mattias Gaertner
> >> <nc-gaertnma at netcologne.de>wrote:
> >>
> >>> "Assigned" is used instead of "FOnClick<>nil"
> >>
> >> What is different between check the Method fields ?
> >> "Assigned(FOnClick)" and "FOnClick<>nil"
> > http://wiki.lazarus.freepascal.org/IDE_tricks#Events_.28Method_properties.29_in_the_Object_Inspector
> >
> >
> Strange, on the page it says:
> > if  OnMyEvent<>  nil  then  OnMyEvent(...);// wrong, because it checks Data too
> 
> > if  OnMyEvent = NewValuethen  exit;// wrong, because it compares only Code
> 
> So I compiled (to assembler)  32 bit:
> 
> Comparison with nil (expect to check code + data, as told above)
> Comparison with other method (expect code only)
> 
> But in both cases it tests one long entry (testl or cmpll). so the same 
> amount of data. It doesn't look that <> nil checks code+data?

You are right. It seems it was changed in the compiler. 
I will update the wiki.

Mattias




More information about the Lazarus mailing list