04-22-2009 09:44 AM
Hi,
I am new to BB Java Application development and facing problem related to screen navigation.
I have two Screens in my application. One is Dashboard having a Icon , and on pressing this Icon user should be able to navigate to the other screen. I have created both the screens separately , now when I try to integrate the same i.e. when I create instance of one screen in other screen I am getting exception as : java.lang.RuntimeException: application already running in this process
Both the screens are extending from UiApplication.
So could anyone please help me to sort this thing out ?
Solved! Go to Solution.
04-22-2009 09:46 AM
You do not extend UiApplication for a screen. You extend Screen (or one of its subclasses, like MainScreen).
Your Application class should extend UiApplication.
Please see the numerous examples of this in the sample programs that ship with the JDE.
04-22-2009 09:50 AM
Thanx RexDoug,
So you mean the first screen which comes after clicking the Application Icon should only be extended from UiApplication ?
04-22-2009 09:50 AM
Thanx RexDoug,
So you mean the first screen which comes after clicking the Application Icon should only be extended from UiApplication ?
04-22-2009 10:04 AM
Thanx it done
...
But I have 1 more problem I am not able to go back to my original screen when I press back Button on BB.
Do I need to Push my dashboard screen on key listener for this ?
04-22-2009 10:48 AM
If you are extending MainScreen, the "back" button is already wired up to close the screen.
If you push screen #2 on top of screen #1, then close screen #2, screen #1 now comes to the top of the screen stack and is displayed.
If you are extending FullScreen you will have to wire up the keys yourself. I recommend overriding keyChar in the screen class.
04-24-2009 05:14 AM