[Zope3-dev] Schema fields, widgets, allowable_values and items
Jim Fulton
jim@zope.com
Mon, 04 Nov 2002 15:44:38 -0500
Martijn Faassen wrote:
> Jim Fulton wrote:
> [snip]
>
>>So, are you saying that we should amend allowed_values to be not just
>>a sequence of values but a sequence of values and labels? Or should there
>>be a separate property?
>>
>
> In Formulator items is a single property.
Keep in mind that Formulator mixes data and presentation.
I'm still a little bit uncomfortable with haveing labels in the schemas.
> It makes it easy to override
> and make dynamic. I imagine in many cases if you get your data from
> say, a relational database, it's easier to have it in a single property
> of label, value tuples instead of two properties, so I'd go for that.
Note that Zope 3 fields don't have "items". They have "allowed_values".
So, do you want to:
1. Make the allowed_values property have a list of value/label pairs?
2. Rename allowed_values to "items" and get items to have a list of value/label
pairs?
3. Do you want *both* allowed_values and items? (I'd prefer some other name
than "items".
4. Do you want some property that contain a sequence of
either values or items. (I don't like that.)
None of the above?
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org