[Zope] Re: [Zope-dev] How to define selection list elements

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Thu, 18 Nov 1999 19:06:57 +1100


>>> technews@egsx.com wrote
> There is a property called selection list, and I was unable to find any
> documentation in how to use it.  I tried adding a space seperated values,
> but it did not work.  In the Zope content manager guide on page 42 (pdf
> version) figure 40 it does not talk about the selection lists.  

easy way: create a property of type 'tokens', specify a bunch of
strings, seperated by spaces (e.g. "abc def ghi jkl"). Say you call
this token property 'option_choices'. Now define a property, type
selection, with a value of 'option_choices'. Voila.

the slightly trickier way: make an object that returns a list of
strings. Set the value of the new selection property to the name
of this object. Done.

Anthony