[Zope3-dev] Getting the parent object
Steve Alexander
steve@cat-box.net
Sat, 30 Mar 2002 16:46:33 +0000
Stephan Richter wrote:
> Hello everyone,
>
> In the last two days I had several times the urgent need to get to the
> parent of an object, but now that we do not use Acquisition anymore, I
> cannot use aq_parent, or can I? Also, based on the new structure, it
> seems that based on the implementation of a container, getting the
> parent is not always the same.
>
> Unless there is a way to get back to the parent otherwise, I propose
> that we set a __parent__ attribute in an object, when it is added to the
> container. Therefore, all containers are required to implement that
> feature.
>
> Please comment!
Inspect the ContextWrapper.
--
Steve Alexander