[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnue-common/gnue/common GParser.py
From: |
Jason Cater |
Subject: |
gnue/gnue-common/gnue/common GParser.py |
Date: |
Thu, 07 Jun 2001 09:58:27 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/06/07 09:58:27
Modified files:
gnue-common/gnue/common: GParser.py
Log message:
Added importing capabilities to forms
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/gnue/common/GParser.py.diff?cvsroot=OldCVS&tr1=1.11&tr2=1.12&r1=text&r2=text
Patches:
Index: gnue/gnue-common/gnue/common/GParser.py
diff -u gnue/gnue-common/gnue/common/GParser.py:1.11
gnue/gnue-common/gnue/common/GParser.py:1.12
--- gnue/gnue-common/gnue/common/GParser.py:1.11 Wed Jun 6 16:02:42 2001
+++ gnue/gnue-common/gnue/common/GParser.py Thu Jun 7 09:58:26 2001
@@ -171,6 +171,7 @@
baseAttrs = self.xmlElements[name][1]
attrs = {}
+ loadedxmlattrs = {}
for attr in saxattrs.keys():
@@ -182,6 +183,7 @@
# Typecasting, anyone? If attribute should be int, make it an int
try:
attrs[attr] = baseAttrs[attr][2](saxattrs[attr])
+ loadedxmlattrs[attr] = attrs[attr]
except:
print 'Error processing <%s> tag [invalid type for "%s" attribute;
value is "%s"]' % (name, attr, saxattrs[attr])
sys.exit()
@@ -191,7 +193,7 @@
if self.uniqueIDs.has_key('%s::%s' % (name, saxattrs[attr])):
print 'Error processing <%s> tag ["%s" attribute should be unique;
duplicate value is "%s"]' % (name, attr, saxattrs[attr])
sys.exit()
-
+
for attr in baseAttrs.keys():
if not attrs.has_key(attr):
@@ -214,6 +216,10 @@
self.bootstrapflag = 1
object._xmltag = name
+
+ # Save the attributes loaded from XML file
+ # (i.e., attributes that were not defaulted)
+ object._loadedxmlattrs = loadedxmlattrs
for attr in attrs.keys():
object.__dict__[attr] = attrs[attr]