[Pas2js] Event onFormChange

warleyalex warleyalex at yahoo.com.br
Mon Aug 13 19:06:02 CEST 2018


Mattias Gaertner wrote
> Do you really want to trigger lfm-to-pas after every little change? Not
> only on save?

Of course not. If I set the WebLabel caption to 'abc' the method is fired 3
times.


Aha, I found the method AddHandlerOnSaveEditorFile is missing/undocumented
at http://wiki.freepascal.org/Extending_the_IDE#Project_events

and using this method we can fire the method LFM-TO-PAS "on before save" the
form unit. This is the trick!

[code]
LazarusIDE.AddHandlerOnSaveEditorFile(@Extension.BeforeSaveCallLFM2PAS);
[/code]

Thanks for the feedback.



--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list