[Zope] Acquisition? Did I just lose my Zen?

Martijn Pieters mj@antraciet.nl
Tue, 21 Sep 1999 15:28:23 +0200


At 14:25 21/09/99 , Jim Fulton wrote:
>You need to rethink your Zope Zen. :) Here's the explanation.
>
>When you acquire an object, the acquired object gets the context of
>the aquirer *and* the context it was acquired from, with the source
>context taking precedence over the destination context.  In the
>example above, 'Personal' acquires from the top-level folder first,
>and then from the 'frames' folder.
>
>Lets walk through why this is so.  Suppose in Python, we have
>a variable 'app' that is the top-level folder.
>
>The expression:
>
>   app.Personal
>
>Gets 'Personal' in the context of 'app'.
>
>   app.frames
>
>Gets 'frames' in the context if 'app'.  So far so good.
>
>Now consider:
>
>   app.frames.Personal
>
>'Personal' is acquired from 'app'.  We have to get 'app.Personal',
>and then use it in the context of 'app.frames'.  This results in:
>
>   (Personal of app) of (frames of app)
>
>When searching for an attribute, we always search the
>innermost contexts first.  In this example, we search
>'Personal of app' before we search 'frames of app'.

Bother. I was afraid that this was the case. This way, you can never 
override the default standard_html_header and -_footer for subfolders of 
the site.

This is actually the first time I ran into this in 7 months of Zope use =/

So, before I go rack my brains on this, how do I accomplish what I want to 
do here...

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------