commit-gnue
[Top][All Lists]
Advanced

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

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


From: johannes
Subject: [gnue] r6940 - trunk/gnue-forms/src
Date: Wed, 2 Feb 2005 13:10:53 -0600 (CST)

Author: johannes
Date: 2005-02-02 13:10:52 -0600 (Wed, 02 Feb 2005)
New Revision: 6940

Modified:
   trunk/gnue-forms/src/GFInstance.py
   trunk/gnue-forms/src/GFParser.py
Log:
Pass url to GFParser's loadFile function (for appserver-resources)


Modified: trunk/gnue-forms/src/GFInstance.py
===================================================================
--- trunk/gnue-forms/src/GFInstance.py  2005-02-02 19:09:23 UTC (rev 6939)
+++ trunk/gnue-forms/src/GFInstance.py  2005-02-02 19:10:52 UTC (rev 6940)
@@ -240,7 +240,7 @@
       else:
         fileHandle = openResource (fileName)
 
-      self.addFormFromFilehandle (fileHandle)
+      self.addFormFromFilehandle (fileHandle, fileName)
       fileHandle.close ()
 
     except IOError:
@@ -251,7 +251,7 @@
   # Add a form from a file-like object specified by it's filehandle
   # ---------------------------------------------------------------------------
 
-  def addFormFromFilehandle (self, fileHandle):
+  def addFormFromFilehandle (self, fileHandle, url = None):
     """
     Loads a GObj based form tree when passed a valid python file handle.
 
@@ -264,7 +264,7 @@
     # Load the file bypassing the initialization We bypass the initialization
     # because <dialog>s are really <form>s and they don't like being children
     # of another form
-    form = loadFile (fileHandle, self, initialize = 0)
+    form = loadFile (fileHandle, self, initialize = 0, url = url)
 
     # Extract the child <dialog>s from the main form tree
     self.reapSubforms (form)

Modified: trunk/gnue-forms/src/GFParser.py
===================================================================
--- trunk/gnue-forms/src/GFParser.py    2005-02-02 19:09:23 UTC (rev 6939)
+++ trunk/gnue-forms/src/GFParser.py    2005-02-02 19:10:52 UTC (rev 6940)
@@ -54,7 +54,7 @@
 ##
 ##
 ##
-def loadFile(buffer, instance, initialize=True):
+def loadFile (buffer, instance, initialize=True, url = None):
   """
   This method loads a form from an XML file and returns
   a GFForm object.  If initialize is 1 (default), then
@@ -67,7 +67,8 @@
   return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', 'form',
            initialize, attributes={"_instance": instance,
                                "_parameters": instance._parameters,
-                               "_connections": instance.connections })
+                               "_connections": instance.connections },
+           url = url)
 
 
 xmlElements = None





reply via email to

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