dabo Commit
Revision 6356
Date: 2011-01-30 16:10:30 -0800 (Sun, 30 Jan 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6356
Changed:
U trunk/ide/ClassDesigner.py
U trunk/ide/ClassDesignerComponents.py
Log:
Fixed an issue with the restoration of lists and tuples as values in cdxml
files. Trac issue #1406.
Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py 2011-01-28 14:36:58 UTC (rev 6355)
+++ trunk/ide/ClassDesigner.py 2011-01-31 00:10:30 UTC (rev 6356)
@@ -1047,7 +1047,10 @@
if typ is bool and
isinstance(kval, basestring):
kval = (kval.lower() in
("true", "t", "yes", "y", "1"))
else:
- kval = typ(kval)
+ if typ in (list, tuple)
and isinstance(kval, basestring):
+ kval =
eval(kval)
+ else:
+ kval = typ(kval)
setattr(col, kprop, kval)
notLast = (kid is not kids[-1])
obj.addColumn(col, inBatch=notLast)
Modified: trunk/ide/ClassDesignerComponents.py
===================================================================
--- trunk/ide/ClassDesignerComponents.py 2011-01-28 14:36:58 UTC (rev
6355)
+++ trunk/ide/ClassDesignerComponents.py 2011-01-31 00:10:30 UTC (rev
6356)
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import os
+
import dabo
dabo.ui.loadUI("wx")
from dabo.dLocalize import _
@@ -248,7 +249,7 @@
strval = val
else:
strval = unicode(val)
- ra[prop] = val
+ ra[prop] = strval
# Add the controlling sizer item properties, if applicable
try:
itmProps =
self.ControllingSizer.getItemProps(self.ControllingSizerItem)
_______________________________________________
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]