Changeset 2911
- Timestamp:
- 03/14/07 08:35:41 (2 years ago)
- Files:
-
- trunk/dabo/dObject.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/dObject.py
r2910 r2911 34 34 35 35 def __init__(self, properties=None, *args, **kwargs): 36 self._baseClassDisplay = None37 36 self._properties = {} 38 37 if self._call_beforeInit: … … 72 71 73 72 def __repr__(self): 74 classname = self._getBaseClassDisplay() 73 bc = self.BaseClass 74 if bc is None: 75 bc = self.__class__ 76 strval = "%s" % bc 77 classname = strval.split("'")[1] 75 78 try: 76 79 ret = "%s (%s)" % (self.Name, classname) … … 78 81 ret = classname 79 82 return ret 80 81 83 84 82 85 def beforeInit(self, *args, **kwargs): 83 86 """ Subclass hook. Called before the object is fully instantiated. … … 228 231 229 232 230 def _getBaseClassDisplay(self):231 """If the underlying _baseClassDisplay attribute is not set,232 parse the string representation of the BaseClass to get the233 appropriate string.234 """235 if self._baseClassDisplay is None:236 bc = self.BaseClass237 if bc is None:238 bc = self.__class__239 strval = "%s" % bc240 self._baseClassDisplay = strval.split("'")[1]241 return self._baseClassDisplay242 243 244 233 def _getBasePrefKey(self): 245 234 try: … … 336 325 _("The base Dabo class of the object. Read-only. (class)")) 337 326 338 BaseClassDisplay = property(_getBaseClassDisplay, None, None,339 _("The human-readable string representing the BaseClass. Read-only. (str)"))340 341 327 BasePrefKey = property(_getBasePrefKey, _setBasePrefKey, None, 342 328 _("Base key used when saving/restoring preferences (str)"))
