J2ME: BlackBerry: getActiveScreen() returns a menu screen

J

John Goche

Hello,

I have observed the following on the BlackBerry API: If a menu
is displayed on top of a screen, then

Screen screen = UiApplication.getUiApplication().getActiveScreen();

will store in variable screen the menu itself rather than
the screen below it. Then screen.getScreen() below will
match the actual screen below the menu. When a menu
is displayed, calling popScreen(screen), where
screen is the active screen,

will simply undisplay the menu.

In either case, if foo is not a menu screen,
foo.isDisplayed() will return true even if
a menu is displayed above it.

What I really need is a function called isMenuScreen()
to test whether the current screen is a menu screen.

If I cannot find such a function I will have to store the
current nonMenu screen whenever I call onDisplay()
because I have some asynchronous events that
need to push and pop screens, and they cannot
determine whether the current screen is a menu
screen. If the current screen is a menu screen
then an extra pop is needed, but the RIM API
seems to provide no way to do this.

Any help with this will be sincerely appreciated,

JG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top