BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-02-2007, 02:57 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: Vodafone
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to use the Changes made Dialog

Please Login to Remove!

I want to save some things (it works with selfmade Buttons) But if there are some Changes in the Editfields and i press Escape comes the Changes Made Dialog, how can i use that?
or the other way how can i block it?

Thx for your help

Last edited by GERMartin : 08-02-2007 at 03:57 AM.
Offline  
Old 08-02-2007, 04:19 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

override the escape key in the keyChar method should do it:

public boolean keyChar(char key, int status, int time) {
boolean retval = false;
switch (key) {
case Characters.ESCAPE:
//do whatever, for example:
UiApplication.getUiApplication().popScreen(UiAppli cation.getUiApplication().getActiveScreen());
retval = true;//handled the event - should prevent changes made dialog
break;
default:
retval = super.keyChar(key, status, time);
}
return retval;
}

there's probably a simpler way though
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!

Last edited by jfisher : 08-02-2007 at 04:20 AM.
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





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