Page 1 of 1

Main.OnUnload event

Posted: Tue Oct 14, 2014 9:39 am
by WharfRat
Can we get a new event that fires when a configuration file is unloaded, something that is the mirror image of Main.OnInit ?

Motivation: I need to broadcast an event over the LAN when the configuration is closed, so that the other computers know that they should not use Network Event Sender or Broadcaster etc. to send events to this computer.

I already trap Main.OnClose for when EventGhost closes, but that does not help when changing XML configuration files.

The name of it is not important, Main.OnQuit or whatever, but the purpose would be useful.

Re: Main.OnUnload event

Posted: Sat Nov 01, 2014 2:43 pm
by WharfRat
Here is another situation I just ran into where it is needed.

I have added a recurring task to eg.Scheduler.

If I close the configuration and then reopen it later, the callback function gets called twice.
(And the callback function gets called more often the more times I reopen the configuration tree)