[Zope] FW: [Zope] Using Zclasses

Michel Pelletier michel@digicool.com
Tue, 6 Jul 1999 08:21:01 -0400


> -----Original Message-----
> From: Michel Pelletier 
> Sent: Tuesday, July 06, 1999 8:18 AM
> To: 'Michael Bernstein'
> Subject: RE: [Zope] Using Zclasses
> 
> 
> 
> 
> > -----Original Message-----
> > From: Michael Bernstein [mailto:mbernstein@profitscape.net]
> > Sent: Monday, July 05, 1999 9:10 PM
> > To: zope@zope.org
> > Cc: Alexander Staubo
> > Subject: Re: [Zope] Using Zclasses
> > 
> > 
> > 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?
> > 
> 
> Correct.
> 
> > > 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?
> > 
> 
> Currently, Properties offer the only way to have assignable 
> attributes in DTML, so it is possible to instanciate an 
> object and assign it to a property.  You would most likely 
> get errors if you tried to manage that property through the 
> managment interface, but otherwise it would behave as expected.
> 
> Note that if you want your object to *contain* other objects, 
> it's probably much better to subclass 'ObjectManager'; which 
> pretty much manages the objects for you and also gives you a 
> nice standard folder interface (which you can discard if not wanted).
> 
> -Michel
>