dabo Commit
Revision 4218
Date: 2008-06-30 19:50:37 -0700 (Mon, 30 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4218

Changed:
U   trunk/ide/ClassDesigner.py

Log:
Fixed problem with non-string attributes of columns being assigned as strings.


Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py  2008-06-30 18:06:28 UTC (rev 4217)
+++ trunk/ide/ClassDesigner.py  2008-07-01 02:50:37 UTC (rev 4218)
@@ -966,10 +966,20 @@
 
                                if kids:
                                        if isGrid:
+                                               colClass = obj.ColumnClass
                                                # All the kids will be columns, 
so add 'em here
                                                for kid in kids:
-                                                       col = obj.addColumn()
-                                                       
col.setPropertiesFromAtts(kid["attributes"])
+                                                       kidatts = 
kid["attributes"]
+                                                       col = colClass(obj)
+                                                       for kprop, kval in 
kidatts.items():
+                                                               if kprop in 
("designerClass", ):
+                                                                       continue
+                                                               typ = 
type(getattr(col, kprop))
+                                                               if not 
issubclass(typ, basestring):
+                                                                       kval = 
typ(kval)
+                                                               setattr(col, 
kprop, kval)
+                                                       notLast = (kid is not 
kids[-1])
+                                                       obj.addColumn(col, 
inBatch=notLast)
                                                # Make it look nice
                                                obj.emptyRowsToAdd = 5
                                                obj.fillGrid(True)




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to