[Zope] My problem or tree tag bug?
Chris Withers
chrisw@nipltd.com
Mon, 21 Aug 2000 09:47:16 +0100
Dieter Maurer wrote:
> > (Info: ([None, (['966520543', []],)], ['966520928', '966520893',
> <-- state ->
> > '966520543']))
> Somehow, your state became a tuple. It should be a list.
Is there anything in postingValues that could cause this? I'm trying to
decide whether it's something my code is doing wrong or whether it's a
bug in dtml-tree..
> The state is read from the namespace under the name 'tree-s'.
> Usually, this is a cookie.
AFAIK, I'm not playing with tree-s or anything else that I shouldn't be.
Is there anything else I could be doing to cause this problem?
> After looking at the code, I fear, your many trees on one
> page will not work, unless they have the "single" argument.
What's the 'single' argument?
> Otherwise, at the end of "TreeTag.tpRender" each tree
> will set the "tree-s" cookies killing the previous tree's
> state.
Several times I've considered re-writing the tree tag from scratch since
the cookie-state thing often seems to break down unless used in simple
circumstances and the code in Treetag.py does seem a bit of a crufty
mess (branches, branches expr, having to specify expr instead of just
using "", no _ in expr, state in cookies (which can really go badly
wrong :S), hard coded formatting of trees, etc) but the last time I put
it off because I thought a major overhaul of DTML was imminent. (in that
instance, I just used an external method to generate my tree since it
was quicker and easier than making dtml-tree behave like I wanted...)
I still think DTML needs a major overhaul but there seems to be a lot of
resitence to this (maybe rightly so?) Perhaps it's time to just redo the
tree tag in isolation then?
What do people think?
cheers,
Chris