Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-05

Codetools OnBeforeCompile/After events

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Does something like OnBeforeCompile/OnAfterCompile exist in codetools?

If not, would it be acceptable as a new code tool, or any criticisms if it is a bad idea? (I can work on a unit that does it, or would it be better to add it to one of the existing codetools units?)

AFAIR delphi had something like it, but its been a while since I worked with delphi ide tools.

Reply by email

Ondrej Pokorny
to Unknown author
Lars wrote
Does something like OnBeforeCompile/OnAfterCompile exist in codetools?

Yes, they exists. "OnAfterCompile":

   LazarusIDE.AddHandlerOnProjectBuildingFinished(@MyEvent);
   LazarusIDE.AddHandlerOnLazarusBuildingFinished(@MyEvent);

Ondrej

Reply by email

Unknown author
to Ondrej Pokorny
Ondrej Pokorny wrote 10 lines
On 26.05.2017 8:21, Lars via Lazarus wrote: > Does something like OnBeforeCompile/OnAfterCompile exist in codetools? Yes, they exists. "OnAfterCompile": LazarusIDE.AddHandlerOnProjectBuildingFinished(@MyEvent); LazarusIDE.AddHandlerOnLazarusBuildingFinished(@MyEvent); Ondrej --

Ahh, maybe I am looking at codetools when I should be looking at lazideintf.pp instead.
As that's where those are located..

For some reason I thought it would be part of code tools for writing plugins to the ide.
Thanks.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 15 lines
On 2017-05-26 01:24, Ondrej Pokorny via Lazarus wrote: > On 26.05.2017 8:21, Lars via Lazarus wrote: >> Does something like OnBeforeCompile/OnAfterCompile exist in codetools? > > Yes, they exists. "OnAfterCompile": > > LazarusIDE.AddHandlerOnProjectBuildingFinished(@MyEvent); > LazarusIDE.AddHandlerOnLazarusBuildingFinished(@MyEvent); > > Ondrej > -- Ahh, maybe I am looking at codetools when I should be looking at lazideintf.pp instead. As that's where those are located..

This may help:
http://wiki.freepascal.org/Extending_the_IDE

For some reason I thought it would be part of code tools for writing plugins to the ide.

Codetools is standalone package and the IDE uses it a lot.

Mattias

Reply by email