On Tue, Apr 19, 2005 at 06:17:30PM +0100, David Given wrote:
> 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.
Sure, but that doesn't constrain the types you can add to a folder.
If you want to constrain availability of a method to instances of
a particular class, then it should be written as a method of that
class. Acquisition is meta_type-agnostic.
> > 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's in the Advanced Scripting chapter of the online Zope Book,
and there are some warnings about ways it can make your system
harder to maintain.
> Incidentally, is it possible to override the default behaviour of an
> object? Is there any way of allowing Rose/MyFavouriteRoseStories do
> something *other* than just executing the named page template, other
> than making MyFavouriteRoseStories a folder and overriding index_html?
> > Anyway, you *should* write your own Products - and for this kind of
> > things, it's pretty easy.
> Meh. Can you point me at any good tutorial documentations?
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -