[Grok-dev] Re: Problems rendering zope.schema.List

Luciano Ramalho luciano at ramalho.org
Tue Jul 17 17:18:01 EDT 2007


I really appreciate your insights, Tres.

On 7/17/07, Tres Seaver <tseaver at palladion.com> wrote:
> The *widget* should handle the case where the default value is None,
> here:  there is *no* reasonable default value for a list widget that can
> be spelled as an attribute of the field at declaration time.

OK, Leo Rochael was suggesting the same thing right now: the culprit
is not the field, but the widget.

> Schemas which specify default values should ideally take a callable
> which returns a value;  one option is to try calling the 'valuetype' of
> the field.

Again, Leo suggested something like the default_method attribute in AT.

> Maybe nobody is using the 'List' schema field type in "real world"
> applications?

I decided to switch to a Tuple schema field. Changes to the value of
that field will be rare, and anyway it will usually contain one or two
values, rarely half a dozen, so updating will not be so expensive.

Thanks for your patience, Tres!

Cheers,

Luciano


More information about the Grok-dev mailing list