[Lazarus] Setter code

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Nov 3 23:39:59 CET 2012


On Sat, 03 Nov 2012 19:03:50 +0100
José Mejuto <joshyfun at gmail.com> wrote:

> Hello,
> 
> Is there any way to change the code generated when autocomplete a Setter 
> in a class ?
> 
> Currently it generates something like:
> 
> procedure Tfrm.SetMyproperty(AValue: string);
> begin
>    if FMyProperty = AValue then exit;
>    FMyProperty := AValue;
> end;
> 
> And I need to change it (for conveniece) to something like:
> 
> procedure Tfrm.SetMyproperty(AValue: string);
> begin
>    if FMyProperty = AValue then exit;
>    debugln('property changed');
>    FMyProperty := AValue;
> end;

No.
But it is open source so you can patch it.
See components/codetools/codecompletion.pas line 6720.

Mattias




More information about the Lazarus mailing list