User Interaction - Fill in Object data?

tblanchard at mac.com tblanchard at mac.com
Wed May 28 20:21:32 UTC 2003


On Tuesday, May 27, 2003, at 05:21  PM, Aaron J Reichow wrote:
>
> The kind of thing I was thinking about eventually is:
>
> {  {#name . #String} . "name is a string"
>    {#birthday . #Date} . "give us a date picker"
>    {#age . #SmallInteger . [:a | a between: 0 and: 120] } .
> 	"a number between 0 and 120.
> 	(line at: 3 ifAbsent: [nil]) isKindOf: BlockContext ..."
>    {#sex . #String . {'female' . 'male' . 'n/a'}} .
> 	"presents us with a drop down box"
>    {#children . #OrderedCollection . #PDAChild} }
>

NextStep has objects called Formatters for translating input from text 
to types and back.  They also do simple format validation. You attach 
formatters to text fields.  The number formatter handles decimal 
precision, localization, currency formats, and such.

Frankly I'd like to see something like that added. ie

TextMorph new formatter: (NumberFormatter format: '#.##').



More information about the Squeak-dev mailing list