[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8546 - trunk/gnue-common/src/logic
From: |
reinhard |
Subject: |
[gnue] r8546 - trunk/gnue-common/src/logic |
Date: |
Mon, 31 Jul 2006 14:48:34 -0500 (CDT) |
Author: reinhard
Date: 2006-07-31 14:48:34 -0500 (Mon, 31 Jul 2006)
New Revision: 8546
Modified:
trunk/gnue-common/src/logic/usercode.py
Log:
Moved code to find _root from __init__ to _buildObject, because for imported
triggers, the parent changes between __init__ and _buildObject.
Modified: trunk/gnue-common/src/logic/usercode.py
===================================================================
--- trunk/gnue-common/src/logic/usercode.py 2006-07-31 18:42:28 UTC (rev
8545)
+++ trunk/gnue-common/src/logic/usercode.py 2006-07-31 19:48:34 UTC (rev
8546)
@@ -70,16 +70,27 @@
self._xml_content_as_cdata_ = gConfig('StoreTriggersAsCDATA')
+ self.__function = None
+
+
+ # -------------------------------------------------------------------------
+ # Build object
+ # -------------------------------------------------------------------------
+
+ def _buildObject(self):
+
# Find the next GRootObj. This can be, for example, either a <form> or
# a <dialog> within a <form>. This must be done because every dialog
# has its own global trigger namespace and its own trigger dictionary.
+ # This cannot be done in __init__ because for imported objects, the
+ # parent changes between __init__ and _buildObject.
parent = self.getParent()
while not isinstance(parent, GRootObj.GRootObj) \
and parent.getParent() is not None:
parent = parent.getParent()
self._root = parent # also used by GTrigger
- self.__function = None
+ return GObjects.GObj._buildObject(self)
# -------------------------------------------------------------------------
@@ -184,11 +195,11 @@
def _buildObject(self):
+ result = UserCode._buildObject(self)
self._root._actions[self.name] = self
+ return result
- return UserCode._buildObject(self)
-
# -------------------------------------------------------------------------
# Phase 1 initialization
# -------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8546 - trunk/gnue-common/src/logic,
reinhard <=