Package sparked :: Module events :: Class EventDispatcher
[hide private]
[frames] | no frames]

Class EventDispatcher

source code

twisted.words.xish.utility.EventDispatcher --+
                                             |
                                            EventDispatcher

The sparked event dispatcher is simpler than the twisted version: it does not use XPath arguments and its event prefix is always empty.

This class exists to simplify the implementation of event dispatchers in sparked without the syntactic sugar of xish' EventDispatcher class.

Instance Methods [hide private]
 
__init__(self, eventprefix='') source code
 
dispatch(self, event, *arg, **kwarg)
Dispatch the named event to all the callbacks.
source code

Inherited from twisted.words.xish.utility.EventDispatcher: addObserver, addOnetimeObserver, removeObserver

Inherited from twisted.words.xish.utility.EventDispatcher (private): _addObserver, _getEventAndObservers

Method Details [hide private]

__init__(self, eventprefix='')
(Constructor)

source code 
Overrides: twisted.words.xish.utility.EventDispatcher.__init__

dispatch(self, event, *arg, **kwarg)

source code 

Dispatch the named event to all the callbacks.

Parameters:
  • obj - The object to be dispatched.
  • event - Optional event name.
Overrides: twisted.words.xish.utility.EventDispatcher.dispatch