I’m rewriting the FES, Fox screen savior app, which is basically just a slide show. It maintains two tables - folders and filenames of pictures to display, and some ranking system in them so that its random picking is biased towards newer and less frequently displayed photos. So far so good, I migrated the data into postgres and that part is okay.
Now the trouble was that I couldn’t run it without the main form - and there can’t be one, as there’s one form per monitor and they are equal. It would be the same with six monitors. It kept complaining that the wx.app wasn’t created yet whenever it tried to create a timer, because I tried to launch these forms from app.afterInit() or .afterSetup() and few other places. Eventually I found (while debugging) that I can hook into the app.Activate event, which is raised when the setup finishes and there’s no main form. In Dabo, this is not app.bindEvent(), its app.uiApp.bindEvent(), which took me a while to notice, so writing it here for whomever may need it.
Now there’s a button on each of these forms which should close it, and their OnHit is bound to my app.Exit() method, which calls app.finish() (don’t know whether this is a Dabo method or wx native), which does its thing but guess what, the timers keep firing and the app doesn’t stop.
Is there some .CloseAllForms() or some such method? Before I dive into yet another search through documentation (had dozens of such fun activities while doing this).