BlackBerryForums.com : Your Number One BlackBerry Community
     

»Sponsored Links


BlackBerryApps.com Best Sellers



Reply
 
LinkBack Thread Tools
  (#1 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 26
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default pushScreen in the middle of class - 11-01-2009, 02:37 PM

If I push a screen from another class will the code in that class complete before (or while) the new screen is displayed. Or does the remainder of the code after the pushScreen get discarded?
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!

  (#2 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 26
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default 11-01-2009, 02:42 PM

Maybe I should be more specific. I have a main screen which has a keylistener. When the user presses a key I push the main screen to update the graphics and then call a method to play audio. No matter what I seem to do the audio plays and then the screen updates. I need the graphics to update and then the audio to play. Whats up?
   
Reply With Quote
  (#3 (permalink)) Old
Dougsg38p Offline
CrackBerry Addict
 
Posts: 815
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 11-01-2009, 03:40 PM

You are probably trying to acccomplish both tasks in the UI event thread. The screen won't paint until the audio is complete.
   
Reply With Quote
  (#4 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 26
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default 11-01-2009, 06:22 PM

Yeah you're right. I've been trying to put the audio in a seperate thread for about the last 2 hours now with no luck (first time). Is there a way to force the screen to repaint?
   
Reply With Quote
  (#5 (permalink)) Old
Dougsg38p Offline
CrackBerry Addict
 
Posts: 815
Join Date: Mar 2008
Location: Austin, TX
Model: 8320
PIN: N/A
Carrier: T-Mobile
Default 11-01-2009, 07:05 PM

Anything you could do to force a repaint would be behind the original screen push in the event queue, so no.

Maybe you should post a code snippet.
   
Reply With Quote
  (#6 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 26
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default 11-01-2009, 07:39 PM

Thanks again Doug. I don't think I need the code snippet, I think I need to figure out how to run a seperate thread. I got some code from blackberry docs but can't get it going yet. I'm working on it, learning a lot.
   
Reply With Quote
  (#7 (permalink)) Old
keatsp Offline
Knows Where the Search Button Is
 
Posts: 26
Join Date: Oct 2009
Model: 8350i
PIN: N/A
Carrier: telus
Default 11-01-2009, 08:28 PM

Got it. The new thread for the audio worked great.
   
Reply With Quote
Reply


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





Copyright © 2004-2009 BlackBerryFAQ.com, BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of Research In Motion Limited.