[Zope] ZClass inheritance and properties (Zope 2.3.0)
Jim Washington
jwashin@vt.edu
Fri, 09 Feb 2001 07:56:27 -0500
Hi, Oliver
Oliver Frommel wrote:
>
> Hello,
>
> I found another more subtle problem with ZClass properties.
> When I create two ZClasses, one of which is the parent of the other, some
> properties seem not be inherited properly.
>
> I create one class ("parent") with parent classes ZObject, CatalogAwareBase
> and ZObjectManager. This class has among others a property called "date1" of
> type Date.
>
> I create another class ("child") with parent classes ZObject, parent (from
> above) and ZDTMLDocument.
>
> 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?
> 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.
> Is this the right way I am using kind of multiple inheritance here?
> What am I doing wrong?
> (I am running Zope 2.3.0 on RedHat Linux 6.0)
hth,
-- Jim Washington