In the dev guide I read this:

"Note: as of this writing the aq_inContextOf examples don't work. 
... there is a collector entry to change it so that you would get 
the answer you expect in the above."

A search at for aq_inContextOf returns nothing.

I'm not sure if it's working properly or not, because I'm not
sure what to expect. Testing with Zope 2.5.1,
here's an external method
which I expected to return (1, 0) but it returns (1, 1):

def tmp_aq_test(self):
    a = self.paul_stuff.aq_inner
    b = a.blech.aq_inner
    c = self.portals.aq_inner
    return (b.aq_inContextOf(a), c.aq_inContextOf(a, 1))

and my folder structure is like:

  - portals ( CMF site)/
  - paul_stuff (folder) / 
                         - blech (folder) /
                                            - tmp_aq_test (Ext. Method)


I've also tried having the ext. method return c.aq_chain,
which suprisingly gives all kinds of stuff that's not on c's
containment path. I thought aq_inner was supposed to only give
the containers???

[<CMFSite instance at 8eb9168>,    # this is "portals"
 <Folder instance at 91bb478>,     # what's this doing here??? 
                                   # "portals" is in the app root! 
<Folder instance at 909d2f8>,      # doesn't aq_inner work???
 <Application instance at 8b11ea0>, 
 <RequestContainer instance at 854dec8>  # what's this doing here? 


Paul Winkler
Look! Up in the sky! It's THE CLAUSTROPHOBIC NOSE!
(random hero from

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to