[Zope] Acquisition and/or Traversal [correction]

Dylan Reinhardt zope@dylanreinhardt.com
Wed, 29 Jan 2003 08:54:24 -0800


One quick correction...

At 06:51 AM 1/29/2003, D2 wrote:
>in context._setObject() context *is* containment ?

I didn't read this question correctly before and gave an unhelpful 
answer.  The context object contains, among other things, a reference to 
your current container object.

Using container-related methods on context (the object) has the effect of 
applying them to a specific container object... which container object that 
is will be determined by context (as in the environment, not the context 
object).

Using container methods on the context object allows you to generalize your 
code, but it's the same thing as if you hard-coded a folder name and 
applied the same methods to it: any objects you create using this technique 
will have a containment relationship with a specific container.  Which 
container that is can be determined by context if you wish.

Sorry if that's pretty jargon-dense... it's a trickier question than I 
realized at first.

Dylan