Re: Zope Inheritance with ZClasse
Hi Ernesto, The best place to ask these questsions is on the zope@zope.org mailinglist. More information about the mailinglists can be found at: http://www.zope.org/Resources/MailingLists/ I forwarded your mail to the list. Hope this helps! On Sun, Jan 28, 2001 at 08:14:18AM -0500, Ernesto Revilla wrote:
Dear Developers of Zope,
I'm trying to model an ERP system using ZClasses. As I have the model running under MS-Access, I know exactly how the model has to be. It's natural form is very, very object-oriented and requires inheritance.
I made a simple example model using ZClasses, but the environment does not work how I did expect. Example:
I have orders, delivery notes and invoices. Meanwhile the three are based on the same base ZClass (say OrdDelInv), orders and delivery notes are based also on a common ZClass (say OrdDel) based on OrdDelInv. Defining a General Property Sheet for each class, and designing the properties needed for each class, and defining a General view for the General Property Sheel in the base classes (OrdDel and OrdDelInv), not the bottom-level (Orders and Delivery Notes), the environment should me offer a 'General' View for each Order or Delivery Note I create.
So,
1. views are not inherited, from one base class to a sub class?
2. Property Sheets do not mix up the properties defined in each class of the class hierarchy, making able to edit them all in the same view?
Best regards, Erny
-- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
1. views are not inherited, from one base class to a sub class? 2. Property Sheets do not mix up the properties defined in each class of the class hierarchy, making able to edit them all in the same view?
Hi! ZClasses don't quite work as expected here. It's not your fault ;-) Basically, Properties are handled very strangely: e.g. if you add a property with the same name as one in the base class, you'd expect it to overload the other. But it would just not be created because it "already exists". The other way round it works: You can add a property on the base class level even if it exists in a subclass. (OK, that's what you'd expect). Views are also not inherited properly. For this kind of stuff, I think ZClasses in their current form will not work so easily. Use Python classes instead or try something else, like the ZPatterns framework. If you prefer ZClasses, Maik Roeder (maik@berg.net) is the specialist ;-) Cheers, Joachim
participants (2)
-
joe@iuveno-net.de -
Martijn Pieters