Home Download Buy Blog Forum Support

Dev Build 2092

Re: Dev Build 2092

Postby lunixbochs on Mon Aug 01, 2011 1:11 pm

jps wrote:it's not ideal wrt module reloading.
as long as there are no issues calling clear() extra times, we could get in the habit of clearing before adding during dev...

sublimator wrote:If you use more than one callback you'd use a different key wouldn't you?
I'd think you would just add all callbacks under a key for your plugin. I can't think of a huge use case where you'd be clearing/adding multiple different callbacks in the middle of your plugin. even so, you could just prefix with plugin and clear a list on reload

I think when I do the module dev plugin I might be able to hook api calls and do stuff like automatically clear regions and callbacks on reload
Posts: 92
Joined: Fri Oct 08, 2010 10:18 pm

Re: Dev Build 2092

Postby wbond on Mon Aug 01, 2011 2:45 pm

jps wrote:There are a pair of new API functions on the Settings object, add_on_change(key, callback) and clear_on_change(key). on_change callbacks are run when any of the settings has changed, either due to the underlying file being reloaded, or set() has been called.

Thanks for these new functions, they work great, and are very useful!
Posts: 568
Joined: Mon Feb 28, 2011 5:33 am


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests