[Zope] Question regarding acquisition behaviour.
Dieter Maurer
dieter at handshake.de
Tue Nov 25 16:02:28 EST 2003
Alec Munro wrote at 2003-11-25 12:51 -0400:
> It is my understanding that while acquisition will traverse up the
> directory tree, it will only do so until it finds a match, and then it
> will restart from that directory.
It looks up each name and commits as soon as it was successful.
The next name will them be search from this place.
> So if I'm in script 'someScript' looking for 'container.HTML.pageX'
This looks up "HTML" from "container" and then "pageX" from "container.HTML".
There is no backtracking (choosing a different "HTML") when "pageX" cannot
be found from "container.HTML".
> ...
> Is there a way around this, to force acquisition to continue traversing
You cannot use acquisition for this.
But, when you know your paths, you can use "restrictedTraverse" to
access any object -- maybe with a path from root.
--
Dieter
More information about the Zope
mailing list