Menu

Problems with YDoubleFormatter

Help
2007-06-26
2013-04-08
  • Nacho Espinosa

    Nacho Espinosa - 2007-06-26

    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

     
    • Tomi Tuomainen

      Tomi Tuomainen - 2007-06-27

      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

       
    • Nacho Espinosa

      Nacho Espinosa - 2007-06-29

      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.

       
      • Tomi Tuomainen

        Tomi Tuomainen - 2007-07-02

        You can pass your own NumberFormat in YDoubleFormatter constructor. The default constructor just uses NumberFormat with default Locale and two digits.

        Tomi

         

Log in to post a comment.