BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-18-2005, 10:06 AM   #1 (permalink)
New Member
 
Join Date: Sep 2005
Model: n/a
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Screens and Control flow

Please Login to Remove!

I have a question regarding control flow when pushing and popping screens off the stack.

When I push a screen onto the stack, my thread continues on to the end. What would be a good way to wait until the screen is done/popped?

For example if I have screen1 which in turn pushes screen2 am I forced to put the code for pushing screen2 into the code for screen1? Would it make more sense to control the screen pushes from the same place?

As a more real example, I have added a menu item to the Compose email page in the Mail application. When the user invokes it, I send the email and then my own screen is pushed onto the stack. When done, the screen pops itself, but then I am back on the compose page. I know how to pop the current screen, the question is "from where"?


Thanks
John
Offline  
Old 11-18-2005, 11:32 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi John,

There is a pushModalScreen() function. This would cause your thread to suspend while waiting for a return. You have to be careful though, you need to call it from a thread that is allowed to block. IE. not your apps main thread.

I'm not clear on the examples you've given, I can't figure out what your trying to do, or what the issue is, so I can't offer a thought on that.

Regards,
Eric
Offline  
Old 11-18-2005, 12:38 PM   #3 (permalink)
New Member
 
Join Date: Sep 2005
Model: n/a
Posts: 9
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thankyou. Can't believe I didn't see that method

Basically I am filing the contents of the email to another entity (our own Document management system) after sending and want to close the Compose screen after it is done.

That should work. Thanks a lot.
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

SIEMEN Simatic 1P6ES7 214-1AD21-0XB0, PLC CPU Sn:3083. Tested.
$149.15
SIEMEN Simatic 1P6ES7 214-1AD21-0XB0, PLC CPU Sn:3083. Tested. pictureSiemen Oiltight 52PT6M3A Push to Test Pilot Light LED Module - GREEN 120V NEW
$69.95
Siemen Oiltight 52PT6M3A Push to Test Pilot Light LED Module - GREEN 120V NEW picture5 new parker style ball point pen retractable siemen black ink has new refil lot
$5.99
5 new parker style ball point pen retractable siemen black ink has new refil lot pictureSIEMEN SIRUS 3RT1017-1BB41 24DC MOTOR STARTER
$25.0
SIEMEN SIRUS 3RT1017-1BB41 24DC MOTOR STARTER picture NEW SIEMEN SIMATIC S5 6ES5-951-7LD21 MODULE PWR SUP S5-115 115/230AC 7/15A
$350.0
 NEW SIEMEN SIMATIC S5 6ES5-951-7LD21 MODULE PWR SUP S5-115 115/230AC 7/15A  picture






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