[Lazarus] Tweaking 'code completion' for event handlers

Alexsander Rosa alexsander.rosa at gmail.com
Fri May 13 14:17:00 CEST 2011


I wish something like this:

//--- into form's private/public/etc
a, b, c: TMyClass;
(some keys are pressed)

...FormCreate...
a := TMyClass.Create;
b := TMyClass.Create;
c := TMyClass.Create;

...FormDestroy
a.Free;
b.Free;
c.Free;


2011/5/13 Mattias Gaertner <nc-gaertnma at netcologne.de>

>
>
>
>  Graeme Geldenhuys <graemeg.lists at gmail.com> hat am 13. Mai 2011 um 09:48
> geschrieben:
>
>
> > Hi,
> >
> > I report a related issue already in the Bug Tracker back in 2009:
> >
> >    http://bugs.freepascal.org/view.php?id=13994
> >
> > No solution has been implemented in Lazarus yet. As a work-around, is
> > there any way to tell Code Completion (Ctrl+Shift+C) for event handlers,
> > to only generate the code in the interface of the unit, and not the
> > implementation section?
>
>
>
> Not yet.
> I will add the checkbox for the implementation to my todo list.
>
>
>  >
> > I like to keep my code implementation in the same order as I have it
> > defined in the Class definition (as defined in Code Tools settings:
> > Method Insert Policy = class order). Currently it place the event
> > handler method always in the undefined published section of my class,
> > and thus the implementation of that method is in the wrong place too. So
> > writing the event handler code, then ask Code Completion to implement
> > the event handler method, I would prefer it (while bug 8135 is not
> > fixed) if Code Tools could only write the method in the interface
> > section only. I can then manually move it to the correct location in my
> > class definition, then do Code Completion again, to implement the
> > interface section in the correct location.
> >
> > Is this possible in Lazarus IDE 0.9.30.x? I can't see an obvious option
> > in Code Tools to adjust this, so I guess the answer is No. I just
> > thought it worth asking to be sure though.
>
>
>
>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>


-- 
Atenciosamente,
Alexsander da Rosa
http://rednaxel.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110513/9c71df75/attachment-0003.html>


More information about the Lazarus mailing list