[Zope] Is this it? THANK YOU!

Julián Muñoz Domínguez jmunoz@softhome.net
Mon, 1 Oct 2001 13:41:23 +0000 (GMT)


I don't understand.
What is the difference between context.this(), context, and container ??

For going a folder up, I use container.aq_parent (has say in the
developpers guide).
But it should work only with acquisition wrappers, what made me suppose
that all the folders have an acquisition wrapper ???

I think this funcion should exist in the folder API, and it "surprises"
(still a newbie) to not find it in "ObjectManagerItem"
Class. In fact, I ask myself if getPhysicalRoot() is not for this purpose
(but reading the documentation it seems to refer to THE 'root' folder ???)






On Mon, 1 Oct 2001, Andrew Kenneth Milton wrote:

> +-------[ tom smith ]----------------------
> | Andrew,
> |
> | > Yes there is...
> | >
> | > self = context.this()
> |
> |
> | Thank you, thank you, , thank you, thank you, thank you, thank you, tha=
nk
> | you, thank you, thank you, thank you, thank you, thank you, thank you, =
thank
> | you, thank you. This will let me stop keeping all my code objects in th=
e
> | same folder, very messy!
>
> hehe.
>
> |
> | Do you know of any documentation about context.this() anywhere? Lord kn=
ows,
> | I've looked but missed that one...
>
> context is a MultiMapping (Zope Name), (or an object that contains some
> number of them), which is basically a stack of dictionaries containing
> your namespace. As you pass through each object between / and you more
> information is pushed on the namespace stack.
>
> Most (Zope) objects contain a this() method that returns self, so
> this() is simply your container (I'm sure it's not you, but, I might be
> mistaken here, it makes little difference), which has a full acquisition
> wrapper.
>
>

-- 

      __o
    _ \<_
   (_)/(_)

Saludos de Julián
EA4ACL
-.-