Author: reinhard
Date: 2006-08-01 08:53:35 -0500 (Tue, 01 Aug 2006)
New Revision: 8547
Modified:
trunk/gnue-forms/src/GFForm.py
Log:
Moved initialisation of trigger system to Phase 2 init so that imported
elements are also visible.
Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py 2006-07-31 19:48:34 UTC (rev 8546)
+++ trunk/gnue-forms/src/GFForm.py 2006-08-01 13:53:35 UTC (rev 8547)
@@ -99,7 +99,7 @@
self._exiting = False
# The "None" init gives datasources time to setup master/detail
- self._inits = [self.phase_1_init, None, self.phase_3_init]
+ self._inits = [self.phase_1_init, self.phase_2_init, self.phase_3_init]
# Trigger support
self._triggerns = {}
@@ -208,6 +208,19 @@
ConnectionTriggerObj.add_connections_to_tree(
self._instance.connections, self)
+
+ # -------------------------------------------------------------------------
+ # Phase 2 initialization
+ # -------------------------------------------------------------------------
+
+ def phase_2_init(self):
+ """
+ Called automatically during phaseInit() startup of GParser.
+ """
+
+ # Trigger system may not be initialized earlier, because imported
+ # elements (e.g. <import-block>) are moved into the form tree in phase
+ # 1 init.
self.initTriggerSystem()
self._triggerns.update(self._triggerNamespaceTree._globalNamespace)
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue