|
Package gnue ::
Package common ::
Package logic ::
Module GTrigger ::
Class GTriggerExtension
|
|
Class GTriggerExtension
- Known Subclasses:
-
GRLayoutElement,
GRReport
Base class for all objects that can fire triggers.
Descendants of this class maintain a list of trigger names and
attached
GTrigger objects. Each trigger name can have
several
GTrigger objects attached, in which case the code of
all of them is executed sequentially.
| Method Summary |
| |
__init__(self)
|
| |
associateTrigger(self,
key,
function)
Associate a trigger with this object. |
| |
processTrigger(self,
key,
ignoreAbort)
Fire the requested trigger if a trigger of that type has been
associated with this object. |
| Class Variable Summary |
dict |
_validTriggers: Dictionary with valid trigger names as keys. |
__init__(self)
(Constructor)
-
|
associateTrigger(self,
key,
function)
Associate a trigger with this object.
More than one trigger of a specific type can be associated with an
object. This function is typically automatically called during tree
construction from xml source.
-
- Parameters:
key -
Trigger name
(type=str)
function -
User provided code to call
(type=callable)
|
processTrigger(self,
key,
ignoreAbort=True)
Fire the requested trigger if a trigger of that type has been
associated with this object.
-
- Parameters:
key -
The name of the trigger.
(type=str)
ignoreAbort -
If True (the default), then language.AbortRequest
exceptions from the trigger are ignored.
(type=bool)
|
_validTriggers
Dictionary with valid trigger names as keys.
-
- Type:
-
dict
- Value:
|