[Zope] Problems with sequence-item
Mark N. Gibson
mark@kaivo.com
Sun, 22 Oct 2000 16:52:59 -0600 (MDT)
>
> I get errors when sequence-item is being called to list the contents of a
> folder
>
> E.g.
> <dtml-in "(1,2,3)" reverse>
> <dtml-var sequence-item>
> </dtml-in>
>
> correctly outputs 3 2 1
>
> When I do
>
> <dtml-in "folder.objectValues()">
> <dtml-var id>
> </dtml-in>
>
> it correctly outputs all ids in the folder.
>
> But
>
> <dtml-in "folder.objectValues()">
> <dtml-var sequence-item>
> </dtml-in>
>
> will fail with an error
> Error Type: AttributeError
> Error Value: __call__
>
> What am I doing wrong ?
>
In this example, <dtml-var sequence-item> is actually trying to call the items
in the folder. In this case, at least one of the items is not callable ( like
another folder). If you did something like this:
<dtml-in "folder.objectValues('DTML Method')">
<dtml-var sequence-item>
</dtml-in>
You would see the results of 'viewing' or calling every DTML Method in folder.
Mark
> Thanks,
>
> Taco Scargo
>
>
>
>
> ________________________________________________________
> 1stUp.com - Free the Web
> Get your free Internet access at http://www.1stUp.com
>
> _______________________________________________
> 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 )
>