[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6760 - trunk/gnue-common/src/logic
From: |
johannes |
Subject: |
r6760 - trunk/gnue-common/src/logic |
Date: |
Tue, 30 Nov 2004 11:37:58 -0600 (CST) |
Author: johannes
Date: 2004-11-30 11:37:57 -0600 (Tue, 30 Nov 2004)
New Revision: 6760
Modified:
trunk/gnue-common/src/logic/GTrigger.py
Log:
Split the trigger's phased init so a referred trigger can be implemented at the
end of a g?d-file
Modified: trunk/gnue-common/src/logic/GTrigger.py
===================================================================
--- trunk/gnue-common/src/logic/GTrigger.py 2004-11-30 09:52:01 UTC (rev
6759)
+++ trunk/gnue-common/src/logic/GTrigger.py 2004-11-30 17:37:57 UTC (rev
6760)
@@ -76,7 +76,7 @@
self._text=''
self._triggerns={}
- self._inits = [None,self.initialize]
+ self._inits = [None,self.initialize,self.initCall]
self.language=language
self.src = src
@@ -110,14 +110,28 @@
self._root._triggerDictionary[self.name] = self
self._triggerns.update(self._root._localTriggerNamespace)
- if self.src == None:
- self.setFunction( self.getChildrenAsContent(), self.language )
- else:
- self.setFunctionFrom(self._root._triggerDictionary[self.src])
+ # If the trigger code is given with the trigger, build the call-function
+ # right now. This way any referring trigger will find a propery function
+ if self.src is None:
+ self.setFunction (self.getChildrenAsContent (), self.language)
+ # ---------------------------------------------------------------------------
+ # Initialize the trigger's call function
+ # ---------------------------------------------------------------------------
+ def initCall (self):
+ """
+ This function get's called in the trigger's phase II init and connectes
+ another's trigger's function to the call-method
+ """
+
+ if self.src is not None:
+ self.setFunctionFrom (self._root._triggerDictionary [self.src])
+
+
+
def setFunctionFrom(self, object):
- self.__call__=object.__call__
+ self.__call__ = object.__call__
def setFunction(self, text, language):
global runtime_list
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6760 - trunk/gnue-common/src/logic,
johannes <=