BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-28-2008, 04:57 PM   #1 (permalink)
New Member
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: Alltel
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How do I get the close status of a screen "invokeLater"ed?

Please Login to Remove!

I have a Screen (AuthScreen) that extends PopupScreen to handle application start-up issues like authentication and/or account creation.

Currently, I have MyApp extends UiApplication. Then, I have my main screen being pushed in the constructor of MyApp.

Then, I have my AuthScreen invoked in the main screen constructor with: UiApplication.getUiApplication().invokeLater(new Runnable()...)

This arrangement works pretty well but I'm not able to figure out a good way to get any information about the AuthScreen return status. For instance, if the user cancels out of the AuthScreen, I want to close the application.

In general, I need to know how to retrieve values from the "Runnable" after it closes and then call "onClose()" in the application if I need to. Or, a different solution completely.
Offline  
Old 10-28-2008, 08:59 PM   #2 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why don't you just have the runnable call close() (or any other method) on the app main screen when appropriate?
Offline  
Old 10-28-2008, 09:08 PM   #3 (permalink)
New Member
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: Alltel
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried a few other things that led to RuntimeExceptions but I guess I never tried this (which works). I was afraid I'd "chop my legs off" so to speak.

A method of my MyPopupScreen:

Code:
    public void close()
    {
        UiApplication.getUiApplication().popScreen(this);
        UiApplication.getUiApplication().getActiveScreen().close();
    }
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

Infrared Photoelectric Switch Sensor Obstacle Avoidance E18-D80NK Sensor Module
$3.74
Infrared Photoelectric Switch Sensor Obstacle Avoidance E18-D80NK Sensor Module picture1PC new YUKEN pressure switch JT-02-350-11
$261.0
1PC new YUKEN pressure switch JT-02-350-11 pictureBQLZR 12V 16A DC OFF/ON Light Car Rocker Switch Set of 4 Black
$5.52
BQLZR 12V 16A DC OFF/ON Light Car Rocker Switch Set of 4 Black picture1PC new E + H pressure switch PMP135-A1N01A2N
$375.0
1PC new E + H pressure switch PMP135-A1N01A2N pictureWiremold 751030 V500-V700 Double Gang Switch And Receptacle Box Ivory. Shipping
$76.26
Wiremold 751030 V500-V700 Double Gang Switch And Receptacle Box Ivory. Shipping  picture






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