[Zope] Using Zclasses

Michael Bernstein mbernstein@profitscape.net
Mon, 05 Jul 1999 18:09:33 -0700


Alexander Staubo wrote:
> 
> To answer your first question, let your "parent" ZClass be a descendant
> of Object Manager; then define your "child" ZClass _within_ the parent
> ZClass definition; that is, add the child ZClass as a subobject of the
> parent.

I assume that you mean that I should create the 'child' ZClass within
the 'Methods' tab of the parent?

> Your second question is trickier, because Zope does not, afaik, support
> properties that are objects. It's possible, but I believe you can't edit
> these properties through the standard management interfaces. Instead,
> you must built your own, and you might have to use Python to store these
> properties.

Hmm, seems a pretty important feature, does anyone know if this sort of
functionality is on the drawing board for the Zope interface?

> The alternative, of course, is to use a string property and refer to the
> object's ID. Acquisition will permit you to access any object in the
> hierarchy above the object in question.

Do you have an example of a simple working application that uses this
technique? And what happens when the pointed-to object is deleted or
modified?

Michael Bernstein.