28 Sep
2000
28 Sep
'00
10:50 a.m.
If you do:
<dtml-in "objectValues('Foo Thing')"> <dtml-let thing=sequence-item> <dtml-var "thing.id()"> </dtml-let> </dtml-in>
You get TypeError: it claims thing is a string, so you can't perform any kind of function call against it.
Some id attributes of Zope objects are methods, some are strings. To account for every case: <dtml-in "objectValues('Foo Thing')"> <dtml-let thing=sequence-item> <dtml-try> <dtml-var "thing.id()"> <dtml-except TypeError> <dtml-var "thing.id"> </dtml-try> </dtml-let> </dtml-in> The need to do this will soon go away with the new "getId()" method mixed in to all Zope objects.