[Zope] ZClass inheritance and properties (Zope 2.3.0)

Jim Washington jwashin@vt.edu
Fri, 09 Feb 2001 13:07:17 -0500


Hi, Oliver

I believe that what you have done is overridden the parent's
propertysheet by making a new one in the child by the same name.
Whether that is the correct behavior is perhaps a matter of debate, but
in the current implementation of ZClasses, you need to use different
propertysheet names in parent and child in order for the child to access
the parent's propertysheets.

-- Jim Washington

Oliver Frommel wrote:
> 
> > >
> > > Now the problem is that the date1 property is not set properly when I put
> > > a new value for "date1" an the REQUEST and call
> > > propertysheets.Basic.manage_editProperties(REQUEST) (which updates all other
> > > properties of "child" properly).
> >
> > What propertysheet is date1 on in the parent class?
> >
> 
> the propertysheets of both the parent and child are called "Basic". So the
> "Basic" property sheet of "parent" contains the "date1" property.
> 
> 
> > > Also "date1" doesn't show up in the properties tab of any "child" object.
> > > (Are inherited properties meant to do this??? If not it might be a good idea
> > > that they do. The property sheet should maybe show inherited properties in
> > > a different color etc.)
> > > However when I try to create a new property called "date1" in the "child"
> > > property sheet I get an error: "Invalid property id, date1. It is in use."
> >
> > Assure that you have a view established for that propertysheet in the
> > parent ZClass, then it will appear in the list of available things for a
> > view in the child ZClass.
> >
> 
> I have a view called "Properties" containing "properties/Basic/manage" for
> "parent". I understand that when I establish a new view selecting
> "properties/Basic/manage" in the child's view tab I manage the property
> sheet of the child, which still doesn't show any of the parents properties.
> 
> Did I miss anything?