Changeset 4218

Show
Ignore:
Timestamp:
06/30/08 19:50:37 (2 months ago)
Author:
ed
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ide/ClassDesigner.py

    r4176 r4218  
    967967                if kids: 
    968968                    if isGrid: 
     969                        colClass = obj.ColumnClass 
    969970                        # All the kids will be columns, so add 'em here 
    970971                        for kid in kids: 
    971                             col = obj.addColumn() 
    972                             col.setPropertiesFromAtts(kid["attributes"]) 
     972                            kidatts = kid["attributes"] 
     973                            col = colClass(obj) 
     974                            for kprop, kval in kidatts.items(): 
     975                                if kprop in ("designerClass", ): 
     976                                    continue 
     977                                typ = type(getattr(col, kprop)) 
     978                                if not issubclass(typ, basestring): 
     979                                    kval = typ(kval) 
     980                                setattr(col, kprop, kval) 
     981                            notLast = (kid is not kids[-1]) 
     982                            obj.addColumn(col, inBatch=notLast) 
    973983                        # Make it look nice 
    974984                        obj.emptyRowsToAdd = 5