[Zope-dev] aq_inContextOf/can anyone explain this zmonitor log?
Bob Pepin
bpe@iee.lu
Mon, 21 Aug 2000 16:03:38 +0200
Hi,
I just experienced some very weird behaviour from aq_inContextOf while I was
trying to get Cut and Paste to work (I had to trace to the whole security stuff
to do this, and read the C source for the acquisition stuff the figure out what
aq_inContextOf does of course... thanks for having such a great, consistent,
mature and well-documented design Zope-guys...)
oh, btw, Copy & Paste seems to work only for objects that have their User
Source at the / level because of the behaviour of inContextOf.
well, here's the log:
Python 1.5.2 (#5, Aug 10 2000, 15:45:20) [GCC 2.95.2 19991024 (release)]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Welcome to <secure_monitor_channel connected 127.0.0.1:2625 at 859f680>
>>> import Zope
import Zope
>>> app=Zope.app()
app=Zope.app()
>>> iee=app.iee
iee=app.iee
>>> doc1=app.iee.doc1
doc1=app.iee.doc1
>>> doc1.aq_inContextOf(iee)
doc1.aq_inContextOf(iee)
0
>>> doc1.aq_inContextOf(app)
doc1.aq_inContextOf(app)
1
>>> doc1.aq_inContextOf(app.iee)
doc1.aq_inContextOf(app.iee)
0
>>> iee.doc1.aq_inContextOf(app.iee)
iee.doc1.aq_inContextOf(app.iee)
0
>>> iee.doc1.aq_inContextOf(iee)
iee.doc1.aq_inContextOf(iee)
1
>>> app.iee.doc1.aq_inContextOf(iee)
app.iee.doc1.aq_inContextOf(iee)
0
>>> app.iee.doc1.aq_inContextOf(app.iee)
app.iee.doc1.aq_inContextOf(app.iee)
0
>>> doc1.aq_inContextOf(iee)
doc1.aq_inContextOf(iee)
0
>>> doc1=iee.doc1
doc1=iee.doc1
>>> doc1.aq_inContextOf(iee)
doc1.aq_inContextOf(iee)
1
>>> doc1.aq_inContextOf(app.iee)
doc1.aq_inContextOf(app.iee)
0
>>> doc1=app.iee.doc1
doc1=app.iee.doc1
>>> doc1.aq_inContextOf(app.iee)
doc1.aq_inContextOf(app.iee)