BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-09-2009, 08:21 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: Globe
Posts: 52
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default trouble with dialog boxes

Please Login to Remove!

hi,

i created a dialog box with a gauge field and a button.

all i wanted to do was after the gauge field is completed, or the button is clicked, the dialog will be closed.

i enclosed the running of the gauge field inside a thread, so that the user can still click the button.

The problem is, after the thread, when i try to close the dialog box, it throws IllegalStateException. i don't even know where the exception is coming from or why it happened.

can somebody help me on this?

thanks.
Offline  
Old 03-09-2009, 08:39 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

You will have to close the dialog on the event thread. The easiest way to do this is with a call to UiApplication.getUiApplication().invokeLater(...). There are other ways to do it, but this seems to be the best way IMO.
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

Tektronix TLA 714 Logic Analyzer Color Portable Mainframe WIN2000 PRO w/ACCY's
$125.0
Tektronix TLA 714 Logic Analyzer Color Portable Mainframe WIN2000 PRO w/ACCY's pictureHP DesignJet 500 C7769B Part: Interconnect Cable & Main Frame C7769-60180
$125.0
HP DesignJet 500 C7769B Part: Interconnect Cable & Main Frame C7769-60180 pictureUsed MAC Panel 13-Slot VXI Mainframe - Part No.12130-044100
$85.0
Used MAC Panel 13-Slot VXI Mainframe - Part No.12130-044100 pictureOliver 77 Row Crop Dirt Shield for Front Main Frame White Tractor
$8.99
Oliver 77 Row Crop Dirt Shield for Front Main Frame White Tractor pictureHP E1400B C-Size 12 Slot VXI Mainframe Hewlett Packard 75000 Series C
$250.0
HP E1400B C-Size 12 Slot VXI Mainframe Hewlett Packard 75000 Series C picture






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