[Zope] How to call methods of a ZClass superclass?
Christian Scholz
cs@comlounge.net
Tue, 13 Jun 2000 02:15:27 +0200
Hi there!
I have a little problem here: I created two ZClasses, where one is derived
from the other, let's say A is the superclass and B the subclass.
In both classes I created a dtml method called foobar().
Now when I have an instance of B, called b, and I call foobar on it,
as in
<dtml-with b>
<dtml-var "foobar()">
</dtml-with>
and I want to call A's foobar() method inside B's foobar() method, how do I do this?
(Actually I have two methods which show forms to fill out and I B's form contains
more. So I want to make B's form to show also the contents of A's form without
copying the code.. Thus I simply want to call A's method to show his part of the
form.)
In Python I would write
class A:
def foobar(self):
do something;
class B(A):
def foobar(self):
A.foobar(self)
do something more;
but with ZClasses it seems to be different (I hope it's possible at all.. ;-)
Any ideas?
best,
Christian