Home Download Buy Blog Forum Support

Unloading plugin

Unloading plugin

Postby emartel on Sat Mar 30, 2013 9:04 pm

Hi,

I'm developing a plugin that relies on some piece of software to be installed. I check for availability during plugin_loaded() (ST3)... in case of failure is there a way to force an unload of the plugin or to disable it? The crappy version is to store a global bool letting me know if it's available or not and in EVERY calls to commands / events check if the bool is set to true... I'd prefer a more elegant option :)

Thanks!
emartel
 
Posts: 23
Joined: Thu Feb 23, 2012 8:59 pm
Location: Montreal, Canada

Re: Unloading plugin

Postby KonTrax on Sat Mar 30, 2013 11:05 pm

use of is_enabled(), although that's pretty much the same.
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: Unloading plugin

Postby emartel on Sun Mar 31, 2013 4:44 pm

Thanks, I didn't realize there was such a thing in the API, I'll simply create a base class that does the checks and inherit from it

Thanks! :)
emartel
 
Posts: 23
Joined: Thu Feb 23, 2012 8:59 pm
Location: Montreal, Canada

Re: Unloading plugin

Postby KonTrax on Tue Apr 02, 2013 3:26 pm

No problem. That's why we're here ;)
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am


Return to Plugin Development

Who is online

Users browsing this forum: sapphirehamster and 3 guests