[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/src/zope/schema -_bootstrapfields.py:1.19.2.1

Garrett Smith garrett@mojave-corp.com
Tue, 22 Jul 2003 10:45:25 -0500


Steve Alexander wrote:
>>> It'll certainly break my code :-)
>>=20
>> How?
>=20
> My code does a bunch of fragile things on top of the widgets code.
>=20
> My plan has been to make changes in Zope that provide the features I
> need (or at least give me flexibility to add the features I need to my
> own code). As these changes get made, I can make my own code less
> special.=20
>=20
> So, I'd like it if you would break my code by properly implementing
> features in Zope 3's code :-)

Lol, same here. My code is broken because of the same approach. But
these changes will cause me to delete most of my stuff, so the rework
should be pleasant.

> I need the flexibility of overriding form values sometimes. Here's an
> example. I have a list of languages in a "what language do you speak"
> drop-down widget. I also have a text box to add a new language to
> that list. What I want is if someone enters some text into the
> text-box and submits the form, that the language will be added to the
> list, *and* the new language will be selected.
> I'd rather do this from my view class than by writing a special widget
> to do it.
> I think it is reasonable for my view class to override the request in
> terms of what data to tell a widget it should present.

I suspect that EditView will need a few protected methods for this sort
of thing, but trivial stuff really.

I wanted to change the codebase as little as possible (sersiously :-) so
I didn't bother with these sort of use cases. But should be much easier
now.

>> The fact that getData does not raise an error when a value is
>> 'missing', hopefully, won't cause too many problems. The validation
>> for required fields occurs in applyChanges.
>=20
> I'm really glad you've taken on all this tricky stuff.

Thanks :-)

 -- garrett