[Zope-dev] ZClass Product : Make Product objects available to several Z Classes
Steve Alexander
steve@cat-box.net
Wed, 25 Jul 2001 12:38:27 +0100
Richard Ettema wrote:
> Hi,
>
> If I have a Product called 'BEER', and in this Product are 2
> ZClasses called 'CAN' and 'BOTTLE'. I want to put DTML Methods in
> the root of BEER, that can be called on by CAN and BOTTLE. Neither
> Class will find the methods when I try this, I have to have a
> identical copy within each ZClass for it to work. What do I need to
> do to make the methods visible, have I missed something with
> permissions?
This question isn't really to do with developing Zope, and so should be
asked on Zope@zope.org rather than zope-dev@zope.org.
I'll give you a clue as to the answer :-)
CAN and BOTTLE are both specialized forms of CONTAINER.
Oh, and if you're thinking of using inheritence with ZClasses... well, I
recommend you don't. Use a Python base class instead. Michel P. and
Chris McD. describe how in the "zope developers' guide", which is very
good, and available somewhere on zope.org.
--
Steve Alexander
Software Engineer
Cat-Box limited