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

Fred L. Drake, Jr. fred@zope.com
Tue, 22 Jul 2003 11:37:20 -0400


Steve Alexander writes:
 > I think this is a resonable default for Text Fields, along with a 
 > min_length of 1. It is easy to specify a missing_value of None for a 
 > particular text field instance, or subclass.

Yeah, we've beaten around this one before, and I'm not going to stand
in the way of this.  But have no doubt that I disagree with the
default.

 > How do you know it is not being used in other projects that are not 
 > checked into public CVS?

We don't.  But it's too early to be too confident that we need it, so
some of these things will get teased out by making changes and hearing
back.

 > I'll need to check my own code.

Please do.  If you need the feature, you'll be able to present a use
case that requires it, which can then be documented as an API
requirement so it doesn't get ripped out again.

 > > setData()
 > >     Set the initial value of the widget for it's initial display.
 > >     When a form is re-rendered due to a "partial submit", this value
 > >     is ignored, and the value from the request is used instead.  This
 > >     requires *really* knowing what the value was on the browser when
 > >     the submit button was pressed---even if it was an empty string.
 > 
 > Related to this, I want to be able to set up a widget with 
 > erroneous/missing data, so that on first viewing a page, I can have it 
 > rendered as if that same data had been present in the request.

That certainly should be possible.  Does it not work using setData()
for the initial display?

 >  > Changing the
 > > get/have/setData() behavior needs very careful review.  The effects
 > > to code will spread well beyond the Zope 3 core, and not just in Zope
 > > Corporation projects.
 > 
 > It'll certainly break my code :-)

Thought so.  ;-)  I suspect it would break some of the things I've
done as well.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation