BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-08-2008, 09:36 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2007
Location: montreal
Model: 8100
PIN: N/A
Carrier: rogers
Posts: 70
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Best way to input decimal values on UI?

Please Login to Remove!

Hi there.

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?

Thanks
Offline  
Old 07-09-2008, 03:06 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you tried to get the value of an editfield, try it with gettext() instead.
create the editfield with filter_numeric to avoid people entering letters.
__________________
java developer, Devinto, hamburg/germany
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

JOHNSON CONTROLS RECONDITIONING KIT V-3754-6005 NEW
$9.99
JOHNSON CONTROLS RECONDITIONING KIT V-3754-6005 NEW  pictureDX-9100-8996 JOHNSON CONTROLS CABINET DOOR MOUNTING FRAME DX91008996
$292.11
DX-9100-8996 JOHNSON CONTROLS CABINET DOOR MOUNTING FRAME DX91008996 pictureJOHNSON A19ABC-36C REMOTE BULB TEMP.
$157.88
JOHNSON A19ABC-36C REMOTE BULB TEMP. pictureJohnson Controls Ignition control G67BG-5
$55.0
Johnson Controls Ignition control G67BG-5 pictureJOHNSON CONTROLS SEP91A-603R SENSING ELEMENT REPLACEMENT KIT *NEW IN BOX*
$49.0
JOHNSON CONTROLS SEP91A-603R SENSING ELEMENT REPLACEMENT KIT *NEW IN BOX* picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.