[Zope] inheritance and ZClasses
Alex Rice
alrice@swcp.com
Sat, 17 Jul 1999 00:07:29 -0600 (MDT)
When using my own python classes as base classes for ZClasses, I want to
handle constructors. So, I figured I would add:
<!--#call "baseClass.__init__(self,...)"-->
after the #with ... createInObjectManager() in my ZClass "constructor"
dtml method.
But, Zope takes issue with that method name when I commit the dtml,
raising a TypeError. Is there a way to call constructors from dtml
methods or elsewhere in ZClasses? Other inherited methods (other than
constructors) give me no troubles. Here is the traceback:
...
File /usr/share/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_Var.py,line
307, in __init__
File /usr/share/Zope-2.0.0a4-src/lib/python/DocumentTemplate/DT_Util.py, line
337, in name_param
(Info: ({'': '"baseClass.__init__(self)"'}, 'call', 1, 'name'))
File /usr/share/Zope-2.0.0a4-src/lib/python/DocumentTemplate/VSEval.py, line
167, in __init__
(Object: baseClass.__init__(self))
TypeError: illegal name used in expression
Thanks for any advice on this,
--
Alex Rice | alrice@swcp.com | http://www.swcp.com/~alrice
Current Location: N. Rio Grande Bioregion, Southwestern USA