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

3M Wireless WIFI Endoscope Car Inspection Snake Camera 8.5mm For iPhone Samsung
$85.89
3M Wireless WIFI Endoscope Car Inspection Snake Camera 8.5mm For iPhone Samsung pictureK9F2G08U0BPCB0 FLASH MEMORY RAM
$17.99
K9F2G08U0BPCB0  FLASH MEMORY RAM  pictureSamsung 8 Channel DVR with 8 Camera Package 250GB
$197.69
Samsung 8 Channel DVR with 8 Camera Package 250GB  pictureSAMSUNG ER4915
$155.0
SAMSUNG ER4915 pictureSAMSUNG SDP-960 HD Document Camera Overhead Projector Visual Digital Presenter
$400.0
SAMSUNG SDP-960 HD Document Camera Overhead Projector Visual Digital Presenter  picture






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