Author Topic: knowing if the c::b has finished startup  (Read 4441 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
knowing if the c::b has finished startup
« 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
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: knowing if the c::b has finished startup
« Reply #1 on: May 28, 2010, 03:15:30 pm »
What do you want to achieve?
And What is the problem of the cbEVT_APP_STARTUP_DONE event?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: knowing if the c::b has finished startup
« Reply #2 on: May 28, 2010, 05:39:48 pm »
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
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100