Duncan Webb wrote: > Dirk Meyer wrote: >> Duncan Webb wrote: >>> This mostly works, at least I haven't found any plug-ins that are >>> broken. >> >> It is kind of ugly because the stuff still uses the old poll code. In >> the future plugisn should register the timer to kaa.notifier. > > I this all, just replace poll for timer?
Yes, the poll stuff is a very bad hack to make sure the plugin is called from time to time. Instead of poll and poll_timer the plugin can use kaa.notifier with a better control: Call self.callme every 4 seconds | t = kaa.notifier.Timer(self.callme) | t.start(4) To stop that later (which is impossible with the poll stuff), callme can return False or somewhere else you can do t.stop(). You can restart the timer later if you need to. Unlike poll(), you can have more than one callback in a plugin, support timer for plugins that do not have a poll function and even use OneShotTimer if you want to do something later. Dischi -- Save time... see it my way.
pgpp4EJBZ0qkn.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel