I have paraphrased your example at

We are considering providing some way for you to acquire properties in the
way you expected.  You can read more about this in the pages connected to
the AcquisitionFeedback page.

----- Original Message -----
From: Stephen Harrison <[EMAIL PROTECTED]>
> http://www.zope.org/Members/Hoekstra/ChangingContexts1
> it states that PARENTS is defined as the acquisition parents of an
> object.  But this is not true.

PARENTS is the list of objects traversed to get to the *published* object.
If you visit "/foo/bar/foo/bar/baz", then PARENTS will contain [bar, foo,
bar, foo, /].  If baz calls another method, PARENTS is unaffected, as are
the URLn and BASEn variables.  Only absolute_url() is affected.

The only way (right now) to search for a property in the order PARENTS
mentions them is to do so explicitly, by looping through the elements of
PARENTS and checking their 'aq_explicit' for the property.  Example Python

for p in REQUEST['PARENTS']:
    if hasattr(p.aq_explicit, propname):
        return getattr(p, propname)
raise AttributeError, propname


Evan @ digicool & 4-am

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to