[Lazarus] Setter code

Sven Barth pascaldragon at googlemail.com
Sun Nov 4 13:08:23 CET 2012


On 03.11.2012 23:39, Mattias Gaertner wrote:
> 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.

Please note that I had already reported a feature request for this in 
March 2010 :)

http://bugs.freepascal.org/view.php?id=15922

Regards,
Sven





More information about the Lazarus mailing list