BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-30-2009, 12:36 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting Focus Lost: Componenet NULL on clicking Escape Key

Please Login to Remove!

Hi,

I am new to Blackberry development. When i click the escape key from the MainScreen i exit the application. Rather i want to go back to the previous screen. I use override the KeyChar () of KeyListener to check if the key pressed was ESC key if true i changed the screen but i exited the application.

Can anyone help me on this?
Offline  
Old 06-30-2009, 08:16 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Pressing ESC will close the current screen. When you close() the last screen on the display stack, your application will exit.

I don't understand the 2nd part of your question.
Offline  
Old 07-06-2009, 09:34 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jun 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Dougsg38p,

Thanks for your reply. I just wanted to go to the previous screen if i click the ESC key. I have found a solution. In keychar(), I check the value of the previous screen and repaint that screen. I return true from the method and it work. Earlier i was returning false which exited the application.
Offline  




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