Changeset 2989
- Timestamp:
- 03/27/07 10:45:10 (2 years ago)
- Files:
-
- trunk/dabo/ui/uiwx/dPemMixin.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/ui/uiwx/dPemMixin.py
r2986 r2989 92 92 # in the 'attProperties' parameter, in which all values are strings. 93 93 # Convert these to the properties dict. 94 builtinNames = __builtins__.keys() 94 95 if attProperties: 95 96 for prop, val in attProperties.items(): … … 97 98 # attProperties has lower precedence, so skip it 98 99 continue 99 try: 100 attVal = eval(val) 101 except: 100 # Note: we may need to add more string props here. 101 if (val in builtinNames) and (prop in ("Caption", 102 "FontFace", "Picture", "RegID", "ToolTipText")): 103 # It's a string that happens to be the same as a built-in name 102 104 attVal = val 105 else: 106 try: 107 attVal = eval(val) 108 except: 109 attVal = val 103 110 properties[prop] = attVal 104 111 properties = dictStringify(properties) … … 2284 2291 # Property definitions follow 2285 2292 BackColor = property(_getBackColor, _setBackColor, None, 2286 _("Specifies the background color of the object. ( tuple)"))2293 _("Specifies the background color of the object. (str, 3-tuple, or wx.Colour)")) 2287 2294 2288 2295 BorderColor = property(_getBorderColor, _setBorderColor, None, 2289 2296 _("""Specifies the color of the border drawn around the control, if any. 2290 2297 2291 Default='black' (str or color tuple)"""))2298 Default='black' (str, 3-tuple, or wx.Colour)""")) 2292 2299 2293 2300 BorderLineStyle = property(_getBorderLineStyle, _setBorderLineStyle, None, … … 2372 2379 2373 2380 ForeColor = property(_getForeColor, _setForeColor, None, 2374 _("Specifies the foreground color of the object. ( tuple)") )2381 _("Specifies the foreground color of the object. (str, 3-tuple, or wx.Colour)") ) 2375 2382 2376 2383 Height = property(_getHeight, _setHeight, None,
