# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1274281834 0 # Node ID d6de9ab3ce2aadc5988d602955c224403fe77a31 # Parent 226e26d1d11e64f7fbadc9fba1f2d410c70f2473 Fixed a small problem with the fife timer library. There was a problem with UH when clicking on certain buttons on the main menu which cased a hang/crash. The timer now stops itself before executing the callback. diff -r 226e26d1d11e -r d6de9ab3ce2a engine/python/fife/extensions/fife_timer.py --- a/engine/python/fife/extensions/fife_timer.py Wed May 19 14:34:35 2010 +0000 +++ b/engine/python/fife/extensions/fife_timer.py Wed May 19 15:10:34 2010 +0000 @@ -103,14 +103,17 @@ """ Should not be called directly. This is called by FIFE. """ - if callable(self._callback): - self._callback() - if self._repeat != 0: self._executed += 1 if self._executed >= self._repeat: + print "in here" self.stop() + if callable(self._callback): + print "calling event" + self._callback() + + def delayCall(delay,callback): """ Delay a function call by a number of milliseconds.