Hi,

the handling of fractional digits was one thing that I had to stick quite some 
effort into. My component actually prevents entering of invalid chars depending 
on the active locale handles not only parsing of numeric values depending on 
the local, but also displaying them. You can restrict it to only allowing 
positive values as well as restricting/forcing the number of fractional digits, 
so it does go quite a bit further than Carlos' solution. And it doesn't use a 
formatter. 

Limitations:
- No support of Grouping chars (currently)
- Some glitches while typing "0.xxx" values.
- Small problem setting the maximum number of fractional digits to infinite 
(currently the max number of fractional digits is set to 2 per default)

Chris




-----Ursprüngliche Nachricht-----
Von: João Fernandes [mailto:joaopedromartinsfernan...@gmail.com] 
Gesendet: Donnerstag, 3. Januar 2013 13:34
An: flex-dev@incubator.apache.org
Betreff: Re: NumericInput component?

Hi Carlos

to be honest I don't like the fact there are formatters within a visual 
component, in my opinion, they should never be coupled.
Another issue is that you use "," and "." hardcoded, shouldn't decimal and 
number grouping separator be configurable so they can take any possible sign?

Regards

João Fernandes

On 3 January 2013 12:24, Carlos Rovira <carlos.rov...@codeoscopic.com>wrote:

>
> Maybe this will solve the NS problems and will not need a new component?
> (this code could be refactored to the core parts of the component 
> instead of this kind of solving).
>
> Let me know your opinion.
>
> Thanks
>



-- 

João Fernandes

Reply via email to