[Zope] virtual method inheritance/overriding in zope?
Roy Mathew
roymath@yahoo.com
Mon, 31 Dec 2001 06:41:14 -0800 (PST)
Thanks Lennart, that was exactly it. The top level caller (ie: x)
needed to be a DTML method.
Nice to have a solution.
Roy.
--- Lennart Regebro <lennart@regebro.nu> wrote:
> From: "Roy Mathew" <roymath@yahoo.com>
> > My issue is: I would expect that the acquisition mechanism behaves
> > akin to the use of virtual methods in Java or regular methods in
> > Python (ie: when there are more than one methods/attributes of the
> > same name in a hierarchy of classes, then the most derived name takes
> > precedence). However, I am finding that this is not the case.
> >
> > To illustrate, I have a folder hierarchy that contains the following
> > DTML files. (I have listed the filenames, and the text of each file
> > alongside, since there is only 1 line in each file).
>
> DTML files? Do you mean DTML Documents or DTML Methods?
>
> > To be explicit, rendering /A/x looks as follows:
> > this is /x
> > this is /y
> > this is /A/z
> > instead of:
> > this is /x
> > this is /A/y
> > this is /A/z
>
> Ah, you are using DTML Documents. Yes, that is correct. The Documents does
> not behave like methods. The Methods do, though. Make x a DTML Method to get
> the effect you want.
>
>
>
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com