49 |
####################################################### |
####################################################### |
50 |
# This method loads a form from an XML file and returns |
# This method loads a form from an XML file and returns |
51 |
# a GFForm object. If initialize is 1 (default), then |
# a GFForm object. If initialize is 1 (default), then |
52 |
# the form is initialized and ready to go. |
# the form is initialized and ready to go. |
53 |
# |
# |
54 |
# (initialize=0 is currently not used -- will probably |
# (initialize=0 is currently not used -- will probably |
55 |
# be used in the Forms Designer package where we will |
# be used in the Forms Designer package where we will |
56 |
# not want the loaded form to connect to databases, etc) |
# not want the loaded form to connect to databases, etc) |
57 |
####################################################### |
####################################################### |
58 |
|
|
59 |
def loadForm(buffer, app, initialize=1): |
def loadForm(buffer, app, initialize=1, parameters={}): |
60 |
return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', 'form', |
return GParser.loadXMLObject (buffer, xmlFormsHandler, 'GFForm', 'form', |
61 |
initialize, attributes={"_app": app, |
initialize, attributes={"_app": app, |
62 |
"_connections": app.connections }) |
"_connections": app.connections}, initParameters=parameters) |
63 |
|
|
64 |
|
|
65 |
xmlElements = None |
xmlElements = None |