In my Flex application, I have a TextInput box that a user may enter a Number. It comes in as a String, then passes through a NumberFormatter. The result then gets displayed in the TextInput box. This works fine for small numbers.
Large numbers have a problem. For example, if the user enters 100e30 (which is scientific notation for 1×10^32), the TextInput displays:
100000000000000000000000000000000
when what I really want to display is
1.0E32
This is how it appears (and is stored) internally in Flash Builder, for example, as viewed using the debugger.
Is there any simple routine in AS3/mxml that can output scientific notation to a TextInput control?
Output :
To set it to the text input :