[Zope] Using Zclasses

Alex Rice alrice@swcp.com
Mon, 5 Jul 1999 18:29:46 -0600 (MDT)


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

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

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

Have you looked into using Object Manager as a base class? This allows
specified types (including ZClasses) to be actually contained in your
ZClass instances, kind of like a Folder.

Alex Rice    |    alrice@swcp.com    |    http://www.swcp.com/~alrice
    Current Location: N. Rio Grande Bioregion, Southwestern USA