Base class for a generic event source
You may subclass this class to create other kinds of event sources: change
the singleFire class attribute to False in your subclass if you would
like for events to be broadcast to all callbacks, whether they accept or
reject the event.
Methods
|
|
__init__
_buffer
_fire
addCallback
disable
enable
nextAction
|
|
__init__
|
__init__ ( self )
|
|
_buffer
|
_buffer ( self, event )
Exceptions
|
|
ValueError( "Can't buffer event", self, event )
|
|
|
_fire
|
_fire ( self, event )
|
|
addCallback
|
addCallback ( self, func )
See events.IEventSource.addCallback()
|
|
disable
|
disable ( self )
Pause event callbacks
|
|
enable
|
enable ( self )
Resume and send saved events
Exceptions
|
|
ValueError( "More enable() calls than disable() calls", self )
|
|
|
nextAction
|
nextAction (
self,
task=None,
state=None,
)
See events.ITaskSwitch.nextAction()
|
|