|
TI.restrict =
'0-9\\-'
Pim From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Harald Dehn Sent: mardi 28 mars 2006 10:18 To: [email protected] Subject: AW: [flexcoders] Flex 2 Beta 2 - Bug with mx.controls.TextInput restrict Property Hello Gordon,
Please look at the example: TextInput.restrict = "0-9 ,.\-" There is a backslash before the minus sign, but it doesnt work.
Harry
Von:
[email protected] [mailto:[EMAIL PROTECTED] Im Auftrag von Gordon Smith
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:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin
Well youre including the minus character in your restrict. So it shouldnt allow negative numbers.
From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Harald Dehn
Hello
I try to restrict the input of a TextInput Control with the following line:
TextInput.restrict = "0-9 ,.\-" + _CurrencySymbol;
Unfortuneally I cant enter negative numbers in the box (it dont 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
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.controls.T... Philippe Maegerman
- RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.contr... Gordon Smith
- RE: [flexcoders] Flex 2 Beta 2 - Bug with mx.contr... Philippe Maegerman

