[Zope] Storing a list of numbers in a property

Chris Walter walter@budoe.bu.edu
Wed, 8 Sep 1999 16:19:14 -0400 (EDT)


Hi Zope-sters,

Can anyone tell me how to store a list in a property in a
property_sheet in a zclass instance?

What I want is to have a property (lets say its called grades).  So I
can

<dtml-with student>
 <dtml-in grades>
  Homework: <dtml-var sequence-item>
 </dtml-in>
</dtml-with>

Which should loop through the grades list and print them out. 

The thing is: I can't figure out what kind of property to use.  If I
use a string and stick 23, 45, 67 in it then I get an error that you
can't use strings with an dtml-in.

I tried using "token" and "lines"(I'm not actually sure what these
are).  This worked but I was unable to math with the entries.  I get
the error:

number coercion failed

When I try to do something like this:

<dtml-let value=sequence-item>
<dtml-call "REQUEST.set('total',total+value)">

Any hints?

-Chris Walter
walter@budoe.bu.edu