Author: reinhard
Date: 2007-04-26 11:46:07 -0500 (Thu, 26 Apr 2007)
New Revision: 9536
Modified:
trunk/gnue-forms/src/GFForm.py
Log:
Moved extraction of dialogs from _buildObject() to initialize(), since
_buildObject() also runs when a library is imported, and we don't want to
extract dialogs in that case.
issue165 testing
Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py 2007-04-26 16:36:13 UTC (rev 9535)
+++ trunk/gnue-forms/src/GFForm.py 2007-04-26 16:46:07 UTC (rev 9536)
@@ -275,22 +275,28 @@
if child._type == 'GFParameter':
self.__parameter_dict[child.name] = child
- # Extract the child <dialog>s from the main form tree
- for child in self._children[:]:
- if isinstance(child, GFForm):
- child.setParent(None)
- self.__subforms[child.name] = child
- self._children.remove(child)
-
return GFObj._buildObject(self)
# -------------------------------------------------------------------------
- # Merge default form into this form
+ # Initialize the form and merge default form into this form
# -------------------------------------------------------------------------
def initialize(self, default_form):
+ """
+ Initialize the form and all its dialogs.
+ """
+ # Extract dialogs contained in this form tree, so later in phaseInit,
+ # each object really sees the correct root object.
+ # Note that we can't do this in _buildObject, since it may not run for
+ # imported gfd's.
+ for child in self._children[:]:
+ if isinstance(child, GFForm):
+ child.setParent(None)
+ self.__subforms[child.name] = child
+ self._children.remove(child)
+
# Merge in default menu and toolbar.
self.merge(default_form)
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.