BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 09-10-2007, 05:49 PM   #1 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8300
PIN: N/A
Carrier: velizon
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with RadioButtonField

Please Login to Remove!

Hi ,

I am new to develop blackberry software.

I am writing application which user choose server mode or client mode from radio button.
My application does not work: when I choose one of radio button (server or client), the brackberry desktop turn to white and all icons are gone.

I am doing something wrong...Would someone please see my code and let me know where I am doing wrong?

public void populateMainScreen(MainScreen screen)
{

RadioButtonGroup rbGroup = new RadioButtonGroup();
_server = new RadioButtonField("Server Mode",rbGroup,false);
_client = new RadioButtonField("Client Mode",rbGroup,true);

_server.setChangeListener(this);
_client.setChangeListener(this);

screen.add(_server);
screen.add(_client);
}

public void fieldChanged(Field field, int context)
{
if (field == _server)
{
Dialog.inform("server button is chosen.");
}
if (field == _client)
{
Dialog.inform("client button is chosen.");
}
}

Do I need to override trackwheelClick function?

Thanks In Advance
tacomaWA
Offline  
Old 09-10-2007, 10:55 PM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi tacomaWA,

I've worked with your code but i didn't experience the error that you are facing. I am not getting, why your brackberry desktop turn to white when you choose one of radio button.

But i've found one thing in your code that fieldChanged event is Invoking by both field when any one property is being changed. Is it causing any harm for you?

Cheers,
ARIF
Offline  
Old 09-11-2007, 06:56 PM   #3 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8300
PIN: N/A
Carrier: velizon
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

HI arifzaman

Thanks sooooo much for your help.
I created new class file, compiled and I did not see the problem again.....

Anyway,thanks!!
TacomaWA
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

On-Off Electric Globe Valve Actuator, 76 sec. Cycle Time, 61 in.-lb. Torque
$318.81
On-Off Electric Globe Valve Actuator,  76 sec. Cycle Time,  61 in.-lb. Torque pictureNEW JOHNSON CONTROLS 3/4' N.O. VALVE WITHOUT ACTUATOR VB-3754-4
$32.99
NEW JOHNSON CONTROLS 3/4' N.O. VALVE WITHOUT ACTUATOR VB-3754-4 pictureJOHNSON CONTROLS SWITCH, THERMOSTATIC A36AGA-9C NSN: 5930-00-551-0458
$145.0
JOHNSON CONTROLS SWITCH, THERMOSTATIC  A36AGA-9C  NSN: 5930-00-551-0458 pictureJOHNSON CONTROLS METASYS INPUT/OUTPUT FIELD CONTROLLER MODULE MS-IOM1710-0
$54.99
JOHNSON CONTROLS METASYS INPUT/OUTPUT FIELD CONTROLLER MODULE MS-IOM1710-0 pictureJOHNSON CONTROLS Y65A13-0 CLASS 2 TRANSFORMER- 120 VAC, 60 HZ Primary
$10.0
JOHNSON CONTROLS Y65A13-0  CLASS 2 TRANSFORMER- 120 VAC, 60 HZ Primary  picture






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