Some work to integrate checking of chars as typed, probably worth doing at some point though.
For Floats it is likely best to make a specific converter class, folowing the same protocol as ObjectStringConverter. That way there will be some control over the representation (no exponents etc.). Regards, Gary ----- Original Message ----- From: "nullPointer" <[email protected]> To: <[email protected]> Sent: Monday, January 25, 2010 4:53 PM Subject: Re: [Pharo-project] Input different data types (integers or datetimes) in a textbox. > > That is perfect for the moment, many thanks. Magritte is too much > complicated > for me, my brain is limited and cannot understand it :( > > I have a textbox for work with strings and now a NumericEdit control for > numbers; but now I´m trying use decimals, including in TransformBlock -> > [:s | s select: [:c | c isDigit or:[ c = '.' ]]] and Float like type, > but don´t works correctly. > > Is possible implement that mechanism catching the keypress event and > cancel > the event if will be a incorrect format? Perhaps with Date is the best > option. > > Regards. > -- > View this message in context: > http://n2.nabble.com/Input-different-data-types-integers-or-datetimes-in-a-textbox-tp4442293p4455055.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
