BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 12-29-2006, 05:54 AM   #1
newToThis
Knows Where the Search Button Is
 
Join Date: Nov 2006
Model: 7250
Carrier: Carrier Has Arrived
Posts: 29
Default displaying a screen after clicking YES_NO Dialog

Please Login to Remove!

i dont know how exactly to do this but my goal is
for this to happen

1) user clicks yes in YES_NO Dialog
2) YES_NO Dialog will disappear
3) new screen is loaded
4) new screen starts a background thread to ask the server for string msg
5) new screen displays LabelField of the string msg after receiving string msg

MY PROBLEM:
im having issues right now with killed application due to
message queue overflow

i believe im blocking main event thread and taking too long to process
the Dialog response. (i block main event thread with a runnable object
because i want the YES_NO dialog to disappear first..) then load the new
screen.
Offline  
Old 12-29-2006, 07:04 AM   #2
newToThis
Knows Where the Search Button Is
 
Join Date: Nov 2006
Model: 7250
Carrier: Carrier Has Arrived
Posts: 29
Default looks like its fixed for now...

i read from - BlackBerry Developer Journal > July 2005 > BlackBerry Graphical User Interface Part 1 - ... "Calling invokeLater() repeatedly in rapid succession may cause the event queue to overflow and result in an exception."...

So i deleted one call to invokelater and it worked okay for now .. im hoping
it's really fixed.
Offline  
Old 01-05-2007, 08:01 AM   #3
adwiv
Thumbs Must Hurt
 
Join Date: Oct 2006
Model: 8707g
Carrier: Hutch
Posts: 73
Default

I don't see where you need to block the main thread. Use your dialog as the first screen that is pushed onto the stack. Implement the dialog closed listener and attach it to the Dialog. Now when the dialog is closed, your code will be called with the return value, if the value is yes, push the next screen on the stack. You never need to block the thread to wait for the user to click on Yes/No.
Offline  
Old 01-08-2007, 12:06 AM   #4
newToThis
Knows Where the Search Button Is
 
Join Date: Nov 2006
Model: 7250
Carrier: Carrier Has Arrived
Posts: 29
Default

thanks adwiv ill try this listener thing. i have to say though, right now im
not blockign the main event thread anymore. and it works okay although your
suggestion looks likes the safest way to go.
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet  picture

OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet

$2.99



iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M picture

iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M

$4.99



New Apple White Charger Cradle Docking Station Base Stand A1381 OEM picture

New Apple White Charger Cradle Docking Station Base Stand A1381 OEM

$8.50



10 Feet/3M For iPhone 13 12 11 PRO MAX MINI  X XR XS 8 7 Fast Charging USB Cable picture

10 Feet/3M For iPhone 13 12 11 PRO MAX MINI X XR XS 8 7 Fast Charging USB Cable

$5.00



Genuine A1417 OEM Battery Apple Macbook Pro 15 Retina A1398 Mid 2012 Early 2013 picture

Genuine A1417 OEM Battery Apple Macbook Pro 15 Retina A1398 Mid 2012 Early 2013

$40.90



OEM Battery for MacBook Pro 17

OEM Battery for MacBook Pro 17" A1309 A1297 Early 2009 Mid 2009 2010 MC226

$40.90







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