[Zope3-dev] RE: [Formulator-general] An small idea for the future: Strategy pattern for the formulator fields.

Trevor Toenjes zope@toenjes.com
Tue, 16 Apr 2002 12:52:57 -0400


I second that request, something that I also posted months ago.

This requires a change how fields are instantiated.
"Field type" needs to be a property of the field that is chosen when you
select "Add Field".

The drop down to select the fields needs to simply be replaced with "Add
Field" with the "field type" drop down now part of the "Global Properties".

A related question is ...should field-type specific properties be retained
or discarded with the field when you switch to a type that doesnt use them?
My gut, is "retain them as inane properties".  It adds a little bloat to the
field, but maximizes flexibility for Formulator and future use of the field.
You could also provide a "pack" option to a form to delete all inane
properties if it become a big concern.

Cheers,
Trevor


> I pretty often discover that I have created a field of the wrong type, and
> then need to recreate it, with the correct type. Of course I then need to
> move it over to the correct group, set up all the parameters and
> errors and
> stuff again.
>
> I find this highly annoying. Would it be possible to adapt a strategy
> pattern for future formulator fields, maybe the one that gets merged into
> Zope3, so that the type of the field is a setting instead of an object?
> Especially if properties is going to be made with "Zope 3 core formulator"
> (which I understand is the idea).
>
>
>
> _______________________________________________
> Formulator-general mailing list
> Formulator-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/formulator-general
>