[Zope-dev] aq_inContextOf/can anyone explain this zmonitor log?
Toby Dickenson
tdickenson@geminidataloggers.com
Mon, 21 Aug 2000 16:21:33 +0100
On Mon, 21 Aug 2000 16:03:38 +0200, Bob Pepin <bpe@iee.lu> 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
tdickenson@geminidataloggers.com