[Zope] Multiple selections

Jim Fulton jim@digicool.com
Fri, 10 Dec 1999 16:43:11 +0000


Alexander Limi wrote:
> 
> Zopistas,
> 
> Can anybody give me an example of how to use multiple selections? (the data
> type, that is). I searched all my Zope docs, and it was only mentioned one
> place in the Zope quick reference, but no usage examples.

It's a somewhat hacky but useful feature. Mea culpa.

> Where does it get its possible selections from?

At the time you define the property, you must provide
a name as the default value. This name names a sequence, 
typically a "lines" or "tokens" property that gives 
the possible values. 

This feature was added while working with ZClasses
and works fine for ZClass property sheets. 
Unfortunately, it is broken for regular properties.
(I just discovered this while testing this message.)
The values doesn't seem to get initialized properly. :(

(Note that 'selection' properties to work.)

> And will it be rendered as a
> multiple selection field?

Yes.

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.