Something like the following example could work, though there are a few rough edges at present in terms of caret position and editing (I've only used the treansform bit to change case of strings, for instance, which behaves reasonably)...
(UITheme builder newAutoAcceptTextEntryFor: ValueHolder new inspect getText: #contents setText: #contents: getEnabled: nil help: nil) converter: ((ObjectTransformedStringConverter forClass: Integer) transformBlock: [:s | s select: [:c | c isDigit]]); openInWindow Dates are a bit trickier since the class-side #readFrom: expects a correct format or will error... Regards, Gary. On Fri, 2010-01-22 at 12:28 -0800, nullPointer wrote: > I want know if exists some way or mechanism for input data in a widget of a > specific type. For example a textbox with only numbers ( decimals or only > integers ) or some mechanism of mask edit for fill a text in a textbox of > "type" DateTime ?? > > I´m developing a grid widget and I need in each column define a type of > data. With strings is easy but for another values i don´t know do it. > > As always excuse me for my poor english, and regards. > -- > View this message in context: > http://n2.nabble.com/Input-different-data-types-integers-or-datetimes-in-a-textbox-tp4442293p4442293.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
