[Zope] Inserting objects in acquisition chain
Casey Duncan
c.duncan@nlada.org
Wed, 14 Nov 2001 17:02:57 -0500
On Tuesday 13 November 2001 07:49 pm, Oliver Bleutgen allegedly wrote:
> Hi,
>
> in a python product, I want to insert an (folderish) object into the
> namespace like this:
>
> parent_object
> subobject
>
Assuming you want the effect to be temporary, that is only within the product
code, you can do:
new_wrapper = subobject.aq_base.__of__(parent_object)
If subobject is not already an acquisition wrapper then this would do:
new_wrapper = subobject.__of__(parent_object)
>
> Now I want that parent_object behave like subobject would be it's
> sq_parent, all other things should stay the same (acquisition from
> objects higher in the tree etc...).
>
> No other bells and whistles needed, I need exactly what I depicted above.
>
> Any hints?
>
> cheers,
> oliver
>
hth,
/---------------------------------------------------\
Casey Duncan, Sr. Web Developer
National Legal Aid and Defender Association
c.duncan@nlada.org
\---------------------------------------------------/