INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Init() function question  (Read 1376 times)

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Init() function question
« on: November 08, 2003, 12:04:28 am »

Hey all,

Just wondering whether the Init() function of an interface plugin is called before or after the MC database is initialised. I'm finding that I can't reference the MC database directly after the Init() function is called, so I have to use a timer to give MC a few milliseconds to get itself together before accessing the database.
Would it be possible to change they way Init() is called to being called after the database is initialised?
Sugestions, comments, flames?

Scott.
Logged

nila

  • Guest
Re:Init() function question
« Reply #1 on: November 21, 2003, 05:35:42 pm »

Have you tried moving it all to just other events? Control form creation etc?

That might work??
Logged

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:Init() function question
« Reply #2 on: November 22, 2003, 01:29:21 am »

Yeah I have, but it seems that interface plugins are created before the library is set up, so form creation fires before being able to read from the library..

It's just kind of annoying having a timer there when there shouldn't need to be one.

Scott.

Logged

nila

  • Guest
Re:Init() function question
« Reply #3 on: November 23, 2003, 05:26:12 pm »

Just dont make it reference the database then till a user presses a button to 'load plugin' or something.

I personally find this is a much better approach anyway as plugins that try to instantly reference the library and laod it etc slow down my MC startup time and so I end up disabling them - I've done it with XML Export because it was just really slowing down my MC loadup time.

Plugins that interfere with everyday use just get annoying as most plugins probably aren't used daily - just ever now and then.

Just some thoughts :)
Logged
Pages: [1]   Go Up