On Mon, 21 Aug 2000 16:03:38 +0200, Bob Pepin <[EMAIL PROTECTED]> wrote:

Yeah, this is a good one. Theres some debate in the Collector about
whether this is actually a bug or not.

In short, aq_inContextOf checks for nested aquisition contexts. It
does *not* check for nested objects.  It will return zero if you pass
it parallel acquisition contexts, even if the objects are indeed
nested.

>>>> iee=app.iee
>iee=app.iee

>>>> iee.doc1.aq_inContextOf(iee)
>iee.doc1.aq_inContextOf(iee)
>1

This was what you expected

>>>> iee.doc1.aq_inContextOf(app.iee)
>iee.doc1.aq_inContextOf(app.iee)
>0

Here the acquisition wrappers `iee` and `app.iee` are distinct
objects. 

Here is the full story, and a patch to get it to work the other way.

http://classic.zope.org:8080/Collector/1066/view

(This patch used to work, but ive not used it since it was submitted)



Toby Dickenson
[EMAIL PROTECTED]

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

Reply via email to