[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 12:43:16 -0400


Garrett Smith writes:
 > I don't really like the fact that browser widgets read directly from the
 > form. I'd rather something configure the widgets explicitly with calls
 > like:
 > 
 >   setUserInput(value)

What would you pass as value?

 > Here, perhaps, we could state that passing a None value to this method
 > indicates that there 'is no user input'. And
 > 
 >   getUserInput() is None
 > 
 > indicates the same.

Is getUserInput() a widget method?  If something else is providing the
input input to the widget using setUserInput(), the widget wouldn't
need to be involved in this.  So I'm not sure what's going on here.
Also, what is getUserInput() supposed to return?

 > Personally, I would be inclined to move these methods into IWidget...at
 > least getUserInput.

They'll need an explanation; I don't understand what they're supposed
to be doing.

 > I also don't like the fact that widget has getValue and getData -- these
 > are too similar and give no hint as to how they're different. I'd prefer
 > something like:

I think getValue() can be removed.  That appears to be there to
support CustomWidget, but that doesn't use propertyNames or the
non-existant setValue() method.


  -Fred

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