[shpy-commit] r2887 - shpy/trunk/dist/shpy/ui_pygame
arigo@codespeak.net
arigo@codespeak.net
Fri, 23 Jan 2004 15:40:43 +0100 (MET)
Author: arigo
Date: Fri Jan 23 15:40:42 2004
New Revision: 2887
Modified:
shpy/trunk/dist/shpy/ui_pygame/decorate.py
Log:
Fixed the _decoratorcache.
Modified: shpy/trunk/dist/shpy/ui_pygame/decorate.py
==============================================================================
--- shpy/trunk/dist/shpy/ui_pygame/decorate.py (original)
+++ shpy/trunk/dist/shpy/ui_pygame/decorate.py Fri Jan 23 15:40:42 2004
@@ -18,9 +18,10 @@
#typeid = 'structure:0' # should always be overridden by subclasses
def __init__(self, **kwds):
- if not hasattr(self.__class__, '_typeid2class'):
+ if not hasattr(self.__class__, '_decoratorcache'):
raise TypeError, 'cannot instantiate class (use collectdecorators)'
_value = Structure(typeid = self.__class__.typeid)
+ self._decoratorcache[_value] = self
self.__dict__['_value'] = _value
for key, value in kwds.items():
if key != getattr(getattr(self.__class__, key, None),