[Modeling-cvs] ProjectModeling/Modeling Attribute.py,1.18,1.19 Relationship.py,1.16,1.17 Entity.py,1
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2004-01-20 22:11:53
|
Update of /cvsroot/modeling/ProjectModeling/Modeling In directory sc8-pr-cvs1:/tmp/cvs-serv15751/Modeling Modified Files: Attribute.py Relationship.py Entity.py Log Message: Fixed bug #880862 using a patch submitted by John Georgiadis (thanks!): XML exported under py2.3 cannot be imported back because of boolean values 'True' and 'False' not properly handled. Index: Attribute.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Attribute.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Attribute.py 30 Aug 2003 17:22:56 -0000 1.18 --- Attribute.py 20 Jan 2004 22:11:48 -0000 1.19 *************** *** 573,576 **** --- 573,578 ---- set=self.xmlSetAttribute(attributeName) if attrType=='string': value=unicodeToStr(value, encoding) + elif attrType=='number': value=int(value) + elif attrType=='bool': value=int(value) set(value) *************** *** 597,601 **** --- 599,605 ---- exportAttrDict=self.xmlAttributesDict(select=1) for attr in exportAttrDict.keys(): + attrType=self.xmlAttributeType(attr) value=self.xmlGetAttribute(attr)() + if attrType=='bool': value=int(value) value=strToUnicode(str(value), encoding) node.setAttribute(attr, value) *************** *** 635,642 **** self.setExternalType, self.externalType), ! 'isClassProperty' : ('string', self.setIsClassProperty, self.isClassProperty), ! 'isRequired' : ('string', self.setIsRequired, self.isRequired), --- 639,646 ---- self.setExternalType, self.externalType), ! 'isClassProperty' : ('bool', self.setIsClassProperty, self.isClassProperty), ! 'isRequired' : ('bool', self.setIsRequired, self.isRequired), *************** *** 660,664 **** check=0), self.type), ! 'isFlattened' : ('string', self.setIsFlattened, self.isFlattened), --- 664,668 ---- check=0), self.type), ! 'isFlattened' : ('bool', self.setIsFlattened, self.isFlattened), Index: Relationship.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Relationship.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Relationship.py 20 Jan 2004 15:55:13 -0000 1.16 --- Relationship.py 20 Jan 2004 22:11:48 -0000 1.17 *************** *** 257,260 **** --- 257,261 ---- if attrType=='string': value=unicodeToStr(value, encoding) if attrType=='number': value=int(value) + elif attrType=='bool': value=int(value) set(value) *************** *** 283,287 **** --- 284,290 ---- exportAttrDict=self.xmlAttributesDict() for attr in exportAttrDict.keys(): + attrType=self.xmlAttributeType(attr) value=self.xmlGetAttribute(attr)() + if attrType=='bool': value=int(value) value=strToUnicode(str(value), encoding) node.setAttribute(attr, value) *************** *** 308,312 **** self.setDisplayLabel, self.displayLabel), ! 'isClassProperty' : ('number', self.setIsClassProperty, self.isClassProperty), --- 311,315 ---- self.setDisplayLabel, self.displayLabel), ! 'isClassProperty' : ('bool', self.setIsClassProperty, self.isClassProperty), Index: Entity.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Entity.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Entity.py 4 Oct 2003 12:29:43 -0000 1.18 --- Entity.py 20 Jan 2004 22:11:48 -0000 1.19 *************** *** 1279,1282 **** --- 1279,1284 ---- set=self.xmlSetAttribute(attributeName) if attrType=='string': value=unicodeToStr(value, encoding) + elif attrType=='number': value=int(value) + elif attrType=='bool': value=int(value) set(value) *************** *** 1360,1364 **** --- 1362,1368 ---- exportAttrDict=self.xmlAttributesDict() for attr in exportAttrDict.keys(): + attrType=self.xmlAttributeType(attr) value=self.xmlGetAttribute(attr)() + if attrType=='bool': value=int(value) value=strToUnicode(str(value), encoding) node.setAttribute(attr, value) *************** *** 1406,1413 **** self.setExternalName, self.externalName ), ! 'isReadOnly': ( 'string', self.setReadOnly, self.isReadOnly ), ! 'isAbstract': ( 'string', self.setIsAbstract, self.isAbstract ), --- 1410,1417 ---- self.setExternalName, self.externalName ), ! 'isReadOnly': ( 'bool', self.setReadOnly, self.isReadOnly ), ! 'isAbstract': ( 'bool', self.setIsAbstract, self.isAbstract ), |