I Hava a problem with YDoubleFormatter when I use this object and I try to put in the field the value with 0.5 or .5, the field return me the value 5.0 , Is This a bug right?
Probably I don´t use the object correctly.
Greetings!
Nachito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't repeat this so I this is not an obvious bug. You must pass the formatter in YFormattedTextField constructor (as in demo application CustomerView). BTW, can you repeat this in Customer-demo?
Also, you could set your Locale manually for your application to see if it helps (see java.util.Locale method setDefault).
Tomi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Tommi:
I Hava a problem with YDoubleFormatter when I use this object and I try to put in the field the value with 0.5 or .5, the field return me the value 5.0 , Is This a bug right?
Probably I don´t use the object correctly.
Greetings!
Nachito
I can't repeat this so I this is not an obvious bug. You must pass the formatter in YFormattedTextField constructor (as in demo application CustomerView). BTW, can you repeat this in Customer-demo?
Also, you could set your Locale manually for your application to see if it helps (see java.util.Locale method setDefault).
Tomi
I did a test with Locale, and it works!
But there isn´t any method that set a Locale in YDoubleFormatter class. I guess that is a good idea implements that method.
Thank you.
Nachito.
You can pass your own NumberFormat in YDoubleFormatter constructor. The default constructor just uses NumberFormat with default Locale and two digits.
Tomi