[Zope] Using Zclasses

Michael Bernstein mbernstein@profitscape.net
Mon, 05 Jul 1999 16:57:37 -0700


I've been playing around with Zclasses for awhile, but have reached a
bit of a stumbling block.

I want to create a set of Zclasses that can only be contained within
certain other Zclasses. An arbitrary example would be a 'book' object
that can only be created inside a 'shelf' object.

I also would like to add a property to a ZClass that is a pointer to an
instance of another ZClass of a certain type. An arbitrary example would
be a 'Book' ZClass that has an 'Author' property that points to an
instance of an 'Author' ZClass.

Does anyone have any hints as to how to accomplish this sort of thing?
Feel free to recast the problem in terms of the ZClasses tutorial 'CD'
examples.

Michael Bernstein.