[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8426 - in trunk/gnue-common/src: definitions logic
From: |
reinhard |
Subject: |
[gnue] r8426 - in trunk/gnue-common/src: definitions logic |
Date: |
Wed, 19 Apr 2006 03:55:08 -0500 (CDT) |
Author: reinhard
Date: 2006-04-19 03:55:08 -0500 (Wed, 19 Apr 2006)
New Revision: 8426
Modified:
trunk/gnue-common/src/definitions/GRootObj.py
trunk/gnue-common/src/logic/GTrigger.py
Log:
More cleanup.
Modified: trunk/gnue-common/src/definitions/GRootObj.py
===================================================================
--- trunk/gnue-common/src/definitions/GRootObj.py 2006-04-19 08:30:57 UTC
(rev 8425)
+++ trunk/gnue-common/src/definitions/GRootObj.py 2006-04-19 08:55:08 UTC
(rev 8426)
@@ -58,9 +58,6 @@
self._standardnamespaces = {}
self._rootComments = []
- # This will store any "global myVar" that the triggers execute.
- self._globalRuntimeNamespace = {}
-
self.__xmlElementCallback = xmlElementCallback
Modified: trunk/gnue-common/src/logic/GTrigger.py
===================================================================
--- trunk/gnue-common/src/logic/GTrigger.py 2006-04-19 08:30:57 UTC (rev
8425)
+++ trunk/gnue-common/src/logic/GTrigger.py 2006-04-19 08:55:08 UTC (rev
8426)
@@ -74,7 +74,8 @@
GObj.__init__(self, parent, 'GCTrigger')
- self._triggerns={}
+ self.__root = self.findParentOfType(None)
+
self._inits = [None,self.initialize,self.initCall]
self.language=language
@@ -90,22 +91,14 @@
#
# Must be at least a phase 2 init
#
- # TODO: this function merges the local namespace
- # TODO: not sure if this is doing the right thing
- # TODO: with regard to NAMED triggers. It should
- # TODO: merge the local namespace of the object that
- # TODO: fired the trigger.
def initialize(self):
- self._root = self.findParentOfType(None)
- self._triggerns.update( self._root._triggerns )
- self._globalns = self._root._globalRuntimeNamespace
self.__call__ = dummyFunction
if self.type != "NAMED":
if self.getParent ():
self.getParent ().associateTrigger (self.type, self)
else:
- self._root._triggerDictionary[self.name] = self
+ self.__root._triggerDictionary[self.name] = self
# 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
@@ -124,7 +117,7 @@
"""
if self.src is not None:
- self.__set_function_from(self._root._triggerDictionary [self.src])
+ self.__set_function_from(self.__root._triggerDictionary [self.src])
@@ -166,8 +159,8 @@
execution_context = language.create_execution_context(
language = self.language,
name = execution_context_name,
- local_namespace = self._triggerns,
- global_namespace = self._globalns,
+ local_namespace = {},
+ global_namespace = self.__root._triggerns,
builtin_namespace = {})
self.__call__ = execution_context.build_function(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8426 - in trunk/gnue-common/src: definitions logic,
reinhard <=