On 2017-01-27 14:37, Mattias Gaertner via Lazarus wrote: > I added the event. > > uses LazIDEIntf > > LazarusIDE.AddHandlerOnSaveEditorFile(@YourEvent);
A bit late, but thank you for adding that functionality. I've now managed to create my IDE add-on and it works. But I noticed that with every save (Ctrl+S), the YourEvent gets called twice? Any idea why that is, and if it was by design or a bug? For example, I added a simple writeln() in my event handler and ran Lazarus from the command line to see the output. I changed a unit and pressed Ctrl+S. The writeln() output is shown twice... =========================== [lazarus]$ ./lazarus Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/graemeg/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-freebsd-gtk2 New=x86_64-freebsd-gtk2 FPC=True LCL=False PASS: We found the JCF command PASS: We found the JCF command =========================== Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus