On Aug 2, 2006, at 1:58 AM, Julio Oña wrote:
> > P.S. Let's remove this guessing behavior altogether... pleaaaase! :) > It's causing too much trouble in too little time already... > > So may I suggest to change validator from optional to required on > the definition of widgets? > This will certainly correct possible problems and making the api > clearer. Mmm, I'm not sure, there are really cases where no validator is needed, when we expect a normal string, for example. Requiring every widget to specify a validator will only add boiler-plate IMO. The problem with the selection field is that it *needs* one because the input value has to be coerced at least into a list of "somethings". I does this by instantiating a ForEach validator based on the one you provide to coerce the list's items into these "somethings". My suggestion is that the "something"s validator should default to a String if none is provided (or UnicodeString, not sure...), because a string is what we receive as input from the web anyway. No guessing, no magic, no more angry people complaining at the ML... ;) On the other hand, some apps will need to be tweaked to explicitly pass an Int (for example) as a validator to their SelectionFields when the options are not strings (record ids, for example)... Recent issues with the guessing: http://tinyurl.com/h6xmx http://tinyurl.com/f4zx8 Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

