dabo Commit
Revision 6218
Date: 2010-11-26 06:56:16 -0800 (Fri, 26 Nov 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6218

Changed:
U   trunk/ide/ClassDesignerControlMixin.py

Log:
Added code for some cases in Windows where some properties are not accessible 
at object re-creation time.


Diff:
Modified: trunk/ide/ClassDesignerControlMixin.py
===================================================================
--- trunk/ide/ClassDesignerControlMixin.py      2010-11-26 01:36:24 UTC (rev 
6217)
+++ trunk/ide/ClassDesignerControlMixin.py      2010-11-26 14:56:16 UTC (rev 
6218)
@@ -59,7 +59,12 @@
                # Store the defaults for the various props
                self._propDefaults = {}
                for prop in self.DesignerProps.keys():
-                       self._propDefaults[prop] = eval("self.%s" % prop)
+                       try:
+                               self._propDefaults[prop] = getattr(self, prop)
+                       except StandardError, e:
+                               nm = self.Name
+                               dabo.log.error(_("Could not set default prop 
value: object: %(nm)s; property: %(prop); error: %(e)s")
+                                               % locals())
                # Update bindings; do control-specific things.
                if isinstance(self, dui.dGrid):
                        coolEvents = (dEvents.GridHeaderPaint,



_______________________________________________
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