[Zope] Property Sheet Question
Kevin Dangoor
kid@kendermedia.com
Tue, 7 Mar 2000 17:31:07 -0500
----- Original Message -----
From: "James W. Howe" <jwh@allencreek.com>
To: <zope@zope.org>
Sent: Tuesday, March 07, 2000 2:43 PM
Subject: [Zope] Property Sheet Question
> I'm defining a property sheet for a new ZClass object. I want to define a
> property which is collection of items (in my current case it's strings,
but
> conceptually it could be something else). When a new instance is created
> (or edited), I want the user to be able to specify 0 or more items. Is
> there a property type which supports this? What, for example, are "lists"
> and "tokens" and how do you make use of them?
These are what you want. In the case of tokens, it will separate each word
into a list element. A "lines" property separates each line into a list
element.
Tokens: 'foo bar baz' = ['foo', 'bar', 'baz']
Lines:
foo bar
bar
baz
Becomes: ['foo bar', 'bar', 'baz']
> In the particular case that
> I'm working on, I want a user to be able to enter one or more e-mail
> addresses and one or more urls. At some point I will want to iterate over
> the e-mail addresses, or iterate over the urls when I construct a view for
> this object.
This should work fine using standard <dtml-in>s, since tokens and lines are
sequences.
Kevin