[Zope] dtml-tree and a filtered objectValues

Dieter Maurer dieter@handshake.de
Wed, 10 Jan 2001 21:40:59 +0100 (CET)


Jim Hebert writes:
 > ....
 > DMTL method "y":
 > OK, this works:
 > 
 > My DTML Method, "y":
 > <dtml-return "objectValues(['Folder'])">
 > ...
 > used as:
 > <dtml-tree branches_expr="_['y']">
 >  ...
 > causes:
 >   <STRONG>Error Type: AttributeError</STRONG><BR>
 >   <STRONG>Error Value: __getitem__</STRONG><BR>

I tried to reproduce this in Zope 2.3 CVS.

I had to replace "_" by "_vars", as "_" gave me
a "NameError: _" (do not know why), but otherwise,
it worked.

I got your error, too, when I tried 'branches_expr="y"',
but that is expected, because in this case, the
expression evaluates to a DTML method and does not
have a "__getitem__" as required by "tree".


Dieter