Brian Lloyd wrote:
> > >> Is there a simple method like getAcquistionPath() that tells
> > me how I was
> > >> required without having to do some sub optimal REQUEST
> > variable hacking /
> > >> string matching?
> > >>
> > I don't know of any (but that doesn't mean there isn't one). But
> > couldn't you walk up the aq_parent?
> Acquisition tip-o-the-day: you can use:
> print object.aq_chain
> The aq_chain attribute (computed at time of access) provides
> a list (in reverse order) of the objects in the acquisition
Is this *cough* documented anywhere?
grep -r on the Zope source comes up with (not counting test_AqAlg.py):
*ignored, PyObject *args)
./lib/Components/ExtensionClass/src/Acquisition.c: "aq_chain(ob [,
containment]) -- "
So nobody (including the various Products I have installed) uses this
incredibly useful attribute. I have numerous places in my source where I
loop through aq_parent attributes.
It'd be nice to have even a mention in the acquisition documentation.
Poking around the Acquisition C source tells me that there's another
attribute, aq_inner, that isn't documented either.
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -