[Zope] My problem or tree tag bug?

Phil Harris phil.harris@zope.co.uk
Mon, 21 Aug 2000 09:57:41 +0100


Chris,

<goad-mode>

Go on rewrite that tree-tag, go on I dare you.  Make it better, go on, I bet
you can't.

</goad-mode>

8^)

Phil
phil.harris@zope.co.uk

----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>
To: <zope@zope.org>
Sent: Monday, August 21, 2000 9:47 AM
Subject: [Zope] My problem or tree tag bug?


> 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
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )