On 2017-05-26 04:44, Mattias Gaertner via Lazarus wrote:
> On Wed, 24 May 2017 13:43:10 -0500
> Lars via Lazarus <[hidden email]> wrote:
>> I want to intercept/detect this, and add
>> between the begin/end of the event, i.e. on button 1 click.
>> Does codetools provide some way to do it?
> Donald Ziesig added templates to alter the inserted code snippets.
> Please update svn, compile the IDE with
> -dEnableCodeCompleteTemplates and restart it.
> Read the header notes in
> Default templates are defined in
> You can choose your own template file in Tools / Options /
> Codetools / Code creation / Template file.
That's interesting that Michael V. C. wanted logging at begin/end of
code snippets in procedures, because that's exactly what powtils had to
do but it looks kind of ugly at the source level to have IFDEF DEBUG at
the end and begin of each procedure, but that's how I did it..
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, 26 May 2017 19:52:44 -0500
Lars via Lazarus <[hidden email]> wrote:
> > Please update svn, compile the IDE with
> > -dEnableCodeCompleteTemplates and restart it.
> Thanks, I will try. Is it a special Define because it is a new untested
> feature waiting for approval?
Yes, and it is waiting for a discussion about the template file.
Attributes, format, flexibility.
Mattias, I'm still having issues figuring out exactly what Donald Z.'s
code does and how to use it, but is there even a way to "hook" the ide
event insertion currently? i.e. if you throw a Button on a form and
double click it, I want to hook into that, and insert code immediately
after the event has been inserted into the ide text edit window..
If this feature is currently not implemented I can work on a patch today
that does it, however I don't want to work on a patch if this feature
already exists and I just can't find it.
- User adds button 1 to form
- user double clicks button 1
- code is inserted inbetween begin/end automatically
I think the templates may help this but is there really a hook like this
in code tools where you can hook into the events inserted into the IDE
when a user double clicks a button/widget or double clicks the event in
the object inspector?
Lazarus mailing list
[hidden email] http://lists.lazarus-ide.org/listinfo/lazarus