listeners = self.registry.get(event.type, [])
for listener in listeners :
listener(event)
+ def reset(self) :
+ self.registry = {}
def __repr__(self) :
out = StringIO()
EventDispatcher.addEventListener(v.__eventtype__, listener)
def ctor(self, *args, **kw) :
- init_listeners(self)
default_ctor = dict.get('__init__')
if not default_ctor :
super(cls, self).__init__(*args, **kw)
else :
default_ctor(self, *args, **kw)
+ init_listeners(self)
cls.__init__ = ctor