dabo Commit
Revision 4645
Date: 2008-11-03 04:24:00 -0800 (Mon, 03 Nov 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4645
Changed:
U trunk/dabo/lib/DesignerUtils.py
Log:
Enhanced the getDefaultSizerProps() method to handle the mangled names that the
Class Designer sometimes creates.
Diff:
Modified: trunk/dabo/lib/DesignerUtils.py
===================================================================
--- trunk/dabo/lib/DesignerUtils.py 2008-11-03 03:38:40 UTC (rev 4644)
+++ trunk/dabo/lib/DesignerUtils.py 2008-11-03 12:24:00 UTC (rev 4645)
@@ -255,4 +255,11 @@
typ = szType[0].upper()
defaults = _sizerDefaults.get(cls, {})
ret = defaults.get(typ, {})
+ if not ret and isinstance(cls, basestring):
+ # Sometimes the Class Designer mangles names so that they are
unique
+ # E.g., 'dTextBox' becomes 'dTextBox_323432'
+ splitname = cls.split("_")
+ if len(splitname) == 2 and splitname[1].isdigit():
+ defaults = _sizerDefaults.get(splitname[0], {})
+ ret = defaults.get(typ, {})
return ret
_______________________________________________
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]