[Zope] <dtml-tree, the bane of my life :(

Phil Harris phil.harris@zope.co.uk
Fri, 18 Aug 2000 13:38:11 +0100


What a bloody good question:

This has had me stumped all week!

Why isn't _ available in the tree tag?

Phil

----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>
To: <zope@zope.org>
Sent: Friday, August 18, 2000 1:32 PM
Subject: [Zope] <dtml-tree, the bane of my life :(


> Okay, firstly, I notice dtml-tree doesn't support the standard
> abbreviation:
>
> <dtml-TAG "x"> -> <dtml-TAG expr="x">
>
> As the following:
>
> <dtml-tree "_.getitem('sequence-item',0)" branches="postingValues">
>
> gives me:
>
> Error Type: KeyError
> Error Value: "_.getitem('sequence-item',0)"
>
> nice...
>
> Now the one that has me stumped :(
>
> Why does the following:
>
> <dtml-tree expr="_.getitem('sequence-item',0)" branches="postingValues">
>
> Give me:
> Error Type: NameError
> Error Value: _
>
> This is all in 2.1.6...
>
> cheers,
>
> Chris
>
> PS: The traceback for the last one:
> Traceback (innermost last):
>   File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 214, in
> publish_module
>   File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 179, in
> publish
>   File E:\Zope\2179E4~1.6\lib\python\Zope\__init__.py, line 202, in
> zpublisher_exception_hook
>     (Object: ElementWithAttributes)
>   File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 165, in
> publish
>   File E:\Zope\2179E4~1.6\lib\python\ZPublisher\mapply.py, line 160, in
> mapply
>     (Object: manage_postings)
>   File E:\Zope\2179E4~1.6\lib\python\ZPublisher\Publish.py, line 102, in
> call_object
>     (Object: manage_postings)
>   File E:\Zope\2179E4~1.6\lib\python\App\special_dtml.py, line 120, in
> __call__
>     (Object: manage_postings)
>     (Info:
>
E:\Zope\2.1.6\lib\python\Products\Squishdot/Squishdot_manage_postings.dtml)
>   File E:\Zope\2179E4~1.6\lib\python\DocumentTemplate\DT_String.py, line
> 502, in __call__
>     (Object: manage_postings)
>   File E:\Zope\2179E4~1.6\lib\python\DocumentTemplate\DT_In.py, line
> 691, in renderwob
>     (Object: postingValues)
>   File E:\Zope\2179E4~1.6\lib\python\TreeDisplay\TreeTag.py, line 152,
> in render
>     (Object: a tree tag)
>   File E:\Zope\2179E4~1.6\lib\python\DocumentTemplate\VSEval.py, line
> 208, in eval
>     (Object: _.getitem('sequence-item',0))
>   File <string>, line 0, in ?
> NameError: (see above)
>
> _______________________________________________
> 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 )