commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9278 - trunk/gnue-forms/src


From: reinhard
Subject: [gnue] r9278 - trunk/gnue-forms/src
Date: Fri, 12 Jan 2007 06:01:53 -0600 (CST)

Author: reinhard
Date: 2007-01-12 06:01:51 -0600 (Fri, 12 Jan 2007)
New Revision: 9278

Modified:
   trunk/gnue-forms/src/GFForm.py
   trunk/gnue-forms/src/GFInstance.py
Log:
Reuse existing GFInstance when loading forms from another file.


Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py      2007-01-12 11:58:24 UTC (rev 9277)
+++ trunk/gnue-forms/src/GFForm.py      2007-01-12 12:01:51 UTC (rev 9278)
@@ -622,22 +622,15 @@
 
     # -------------------------------------------------------------------------
 
-    def __trigger_run_form(self, fileName, parameters={}):
+    def __trigger_run_form(self, filename, parameters=None):
         """
-        Launches a new instance of GNUe-Forms, running a different form.
+        Loads and activates a new form from a file.
+
         @param fileName: the name of the .gfd file to be displayed
-        @param parameters: dictionary of parameters to be passed
-                            to the newly run form
-        @return: None
+        @param parameters: dictionary of parameters to be passed to the newly
+            run form
         """
-        from GFInstance import GFInstance
-        instance = GFInstance(self._instance.manager,
-                              self._instance.connections,
-                              self._instance._uimodule,
-                              1,
-                              parameters=parameters)
-        instance.addFormFromFile(fileName)
-        instance.activate()
+        self._instance.run_from_file(filename, parameters)
 
     # -------------------------------------------------------------------------
 

Modified: trunk/gnue-forms/src/GFInstance.py
===================================================================
--- trunk/gnue-forms/src/GFInstance.py  2007-01-12 11:58:24 UTC (rev 9277)
+++ trunk/gnue-forms/src/GFInstance.py  2007-01-12 12:01:51 UTC (rev 9278)
@@ -235,7 +235,7 @@
         @param parameters: Parameter dictionary to pass to the form.
         """
 
-        form = self.__load_file(self, filename)
+        form = self.__load_file(filename)
         self.__run(form, parameters)
 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]