Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: frithjofh on May 28, 2010, 12:50:52 pm
-
Hi, everybody,
is there a way to know if c::b has finished its start up other than by receiving the cbEVT_APP_STARTUP_DONE event? Like by some global function or something? I know that there is a "bool m_StartupDone" variable in main, but I found no way to check its value from outside.
Regards
frithjofh
-
What do you want to achieve?
And What is the problem of the cbEVT_APP_STARTUP_DONE event?
-
It's not very important a problem. I am playing around with a plugin for which I took as base the current ToDo plugin (I'm a hobbyist, so I'm playing around in order to learn, and at the moment I'm looking into stl algorithms and containers, that's why I've chosen the ToDo plugin as a base). I'm implementing that the plugin scans the chosen source on start up of c::b, on enabling the plugin or on installing the plugin. On start up I use the cbEVT_APP_STARTUP_DONE event like the ToDo plugin. I supposed there may be a reason for the ToDo to do so, even if I do have to admit, they are not quite clear to me at the moment.
For the cases of enabling or installing the plugin I can not use the cbEVT_APP_STARTUP_DONE event simply because it already happened.
At the moment I use a state variable in the plugin class which is set by the cbEVT_APP_STARTUP_DONE event. In the pluggins OnAtach function I checks against this variable whether or not the app is done and then scans the selected source. In case of installing the plugin this apparently can not work.
So I thought maybe to use some global way to check the state of c::b.
Maybe this is all crap and I could do all the scanning simply on attach of the plugin, whether it is on startup, on enable or on install, me being just mislead by the way the current ToDo plugin does things ... :?
Regards
frithjofh