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" <epicfan@gmail.com> To: <pharo-project@lists.gforge.inria.fr> 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-t... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project