07-08-2008, 10:36 PM
Thumbs Must Hurt
Join Date: Oct 2007
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | Best way to input decimal values on UI?
Please Login to Remove!
I wrote a little app that used NumericFieldChoice for the user to input a limited range of values. Thanks to members' help on this forum I completed and installed it on my Pearl. I then realized there was a bug when the user had to enter a decimal value. The range is anywhere from 0 to 3 in increments of .5.
After doing much reading I came to the conclusion that I can use only ObjectChoiceField or a simple EditField. I then converted that text to a number using Integer.valueOf(value1).intValue() in order to perform the necessary calculations. However I get this error:
cannot find symbol
symbol : method valueOf(net.rim.device.api.ui.component.EditField)
location: class java.lang.Integer
(Note that I'm aware that this is for integer values. I will change it to double when I resolve the error.)
My question is 1) am I on the right path using these fields for numeric input or is there a more efficient way and 2) why am I getting this error message?