Re: [Zope] ZClasses & inheriting property(sheets) : yes/no?
I've been struggling with this problem myself. In particular I can't get the parent propertysheet management method to appear on the Views method list. Is it necessary that the subclass also be contained in the parent? In my design, there is no containment or acquiring relationship between the parent class and the subclass. Jim Washington <jwashin@vt.edu> writes:
If your parent ZClass is constructed properly, you should be able to add the parent class's management tabs by setting a "view". On the "Views" tab, look in the Method list for propertysheets/[ParentClassPropertySheetName]/manage. The properties on that sheet are accessible just like any of the child class's properties.
Aaron Straup Cope wrote:
Hi,
If I create a ZClass that inherits another ZClass, do I also inherit the latter's properties/propertysheet? From what I've read so far, I thought the answer was yes but I can't seem to figure out how to *get* at them.
I created a ZClass called "Foo" that inherits a ZClass named "Meta". Meta had two properties : author and title but neither appear to be set when I create a new Foo object.
Hi, Your name is zope? There is no need for an acquiring or containment relationship. What has worked for me: -Product main folder |-virtualclass |-descendentclass1 |-descendentclass2 where descendentclass1 and descendentclass2 are both descended from virtualclass. i.e, virtualclass shows up in both descendentclasses' "basic" tab as a Base Class. This was established in the "base Classes" area when the ZClasses were created. Ooh. I just checked, and this is probably what you are looking for: The property sheet will not show up in the descendents' view method list unless the base class also has a view established of the property sheet. hth, -- Jim Washington zope@concision.com wrote:
I've been struggling with this problem myself. In particular I can't get the parent propertysheet management method to appear on the Views method list. Is it necessary that the subclass also be contained in the parent? In my design, there is no containment or acquiring relationship between the parent class and the subclass.
participants (2)
-
Jim Washington -
zope@concision.com