|
Sorry, Harald. I must need new glasses.
Thanks for pointing out the right solution, Philippe. A \ in a string literal is always treated
as an escape character, so you have to write "\\-" in order to set
the 'restrict' property to backslash + minus, which the TextField in the TextInput
then interprets as meaning "allow a minus sign". - Gordon From: TI.restrict = '0-9\\-' Pim From: Hello Gordon, Please look at the example: TextInput.restrict
= "0-9 ,.\-" There is a backslash
before the minus sign, but it doesn’t work. Harry Von: No; 'restrict' specifies what is accepted,
not what is rejected. The problem is that the minus sign (a.k.a.
hyphen) is a metacharacter: look at how you're using it in 0-9 to mean 0
through 9. So you have to "escape" it by preceding it with a
backslash. - Gordon From: Well you’re including the minus
character in your restrict. So it shouldn’t allow negative numbers. From: Hello I try to restrict the input of a TextInput Control with the
following line: TextInput.restrict =
"0-9 ,.\-" + _CurrencySymbol; Unfortuneally I can’t enter negative numbers in the
box (it don’t accept the minus character). This example worked fine with
the alpha version of Flex, I already reported the bug for the beta 1 version. Harry
|
- RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.controls.T... Gordon Smith
- RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.contr... Philippe Maegerman

