[Zope-CMF] Re: Skinnable.py Optimisation breaks Acquisition context.
Chris Withers
chrisw@nipltd.com
Wed, 11 Sep 2002 17:00:46 +0100
Shane Hathaway wrote:
>
> Yes. AFAIK you don't need the context of self. You only need the parent.
> The parent holds the REQUEST, doesn't it?
Well, normally yes. BUT....
SimpleTree's node() method stores the object in an attribute a la:
node.object = object
...which of course means the parent has no context, so REQUEST needs to be
acquired from the context of self. Sadly, your optimistion removes this context :-S
Personally, I feel that ZTUtils is probably at fault here :-S
But, how should it preserve acquisition context when it needs to store objects
as attributes of a node item?
cheers,
Chris
PS: As it happens, SimpleTree (and the rest of ZTUtils Tree stuff) is so weak
that I had to write a replacement python script to do what I wanted anyway. It's
pretty frustrating that ZPT's replacement for dtml-tree is just as inflexible
and useless as its predecessor :-S