[Zope] convert #var sequence-item to integer?

Tim Potter Tim.Potter@anu.edu.au
Tue, 10 Aug 1999 12:35:28 +1000 (EST)


Hello everyone.  I'm trying to iterate over a list returned from a
form using #in and the sequence-item DHTML variable to index other
lists.  It's the standard table of checkboxes thing to identify a
group of rows to operate on.  My DHTML is:

<!--#in selections-->
  <!--#let i=sequence-item-->
    link_num = <!--#var "link_num[i]"--><br>
    link_title = <!--#var "link_title[i]"--><br>
    link_data = <!--#var "link_data[i]"--><br>
  <!--#/let-->
<!--#/in-->

The error I get is "sequence index must be an integer".  Zope doesn't
seem to be converting the sequence-item variable into an integer
before looking up the value in the list.  If I change sequence-item to
sequence-index, everything works (except for the fact it returns the
wrong data (-:).

Perhaps this whole list of items with checkboxes next to them
structure should be turned into a pattern, object, or HOWTO item as it
seems to pop up a lot of times in the mail archive.


Tim.

-- 
Tim Potter, System Admin/Programmer              "Disco Stu doesn't advertise"
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602