On Tue, 2005-04-19 at 18:43 +0200, bruno modulix wrote: [...]
All of B's siblings are the same sort of object.
Why do you have this strange idea ?
From, uh, the documentation... because all of B's siblings will inherit the same methods from A.
Then calls like: Rose/Text/MyFavouriteRoseStories/text_methods/do_this
Ah, so *that's* how acquisition by context works! (I couldn't find any documentation on this. All the documentation about acquisition by context just says 'this is really complicated and I'm not going to describe it here'.)
It *is* really complicated, and I'd advise you not to go for this solution. What you want is clearly a Product.
2/ Write a product for your object types. Here it could be a Flower object, extending Folder so you can put texts and images in, and having all the code needed for your texts and images.Unfortunately, this requires having the code dealing with text and
images to be in the same place, which breaks encapsulation.
Why ? What you want is a custom "Flower" object, that can handle texts and images, right ? But if this bother you too much, you can add to your product specific texts and images classes (remember, a product is a componant, not a class - it can be composed of multiple classes, templates, images, external methods etc).
Meh. Can you point me at any good tutorial documentations?
google for zope + "minimal product". Also read the developper's book on zope.org. And read the code of a few products. That's how I did anyway.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce