def event(self, *args): '''Function decorator for an event handler.''' if self.parent is None: return EventDispatcher.event(self.root,*args) else: # If the event is 'on_idle', we attache it directly to the window if args[0] == 'on_idle' or args[0].__name__ == 'on_idle': self.root.push_handlers(*args) else: return EventDispatcher.event(self,*args)
def event(self, *args): '''Function decorator for an event handler.''' if self.parent is None: return EventDispatcher.event(self.root, *args) else: # If the event is 'on_idle', we attache it directly to the window if args[0] == 'on_idle' or args[0].__name__ == 'on_idle': self.root.push_handlers(*args) else: return EventDispatcher.event(self, *args)