I working on a plugin for the ELK M1G alarm panel. It's still a few weeks away from being functional although I'm getting closer. This being the first time I've really written anything this complex. Most of my previous programming has been administrative scripting type stuff. Because of that I've actually completely scrapped and rewritten the thing at least 3 times .
Each time I start anew on the plugin I completely remove the previous version. Deleting the plugin bundle and preferences file. In the latest version I'm doing some things in startup that are necessary for my plugin to work. I'm relying on the plugin config UI to have been run, settings configured and saved. It looks the first time the plugin is run (with no previous prefs file) the startup method is getting run before the config UI diaglog is closed.
Long preamble to a couple questions.
1. Is it possible to have a plugin not run it's startup method until after the plugin config dialog has been closed?
2. If not, have others run into this issue and how have they gotten around it?
I've been thinking of just adding an errorlog to say you have to reload the plugin after you first save the settings. That's a pretty clunky way to do it though. I supposed I could check that things are set up properly in the plugin config validation method. I just wonder if calling startup again from that function would cause anything weird to happen. Like maybe two instances of runConcurrentThread or something like that.
~JC