BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-09-2010, 10:14 AM   #1 (permalink)
New Member
 
Join Date: Aug 2010
Model: 9800
PIN: N/A
Carrier: A1
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Exit App without any warnings?

Please Login to Remove!

Hi,

short question:
Is there a way to close the application without the "Changes made!" (Save,Discard,Cancel) window?

In other words, a "force exit"?

thank in advance,
-josi
Offline  
Old 08-09-2010, 10:50 AM   #2 (permalink)
New Member
 
jsconyers's Avatar
 
Join Date: Jul 2007
Location: In a van down by the river.
Model: NOTE2
OS: 4.1
PIN: <- Where do I find this?
Carrier: Sprint
Posts: 15,091
Post Thanks: 150
Thanked 148 Times in 122 Posts
Default

Remove the battery. Otherwise, no.
__________________
The difference between stupidity and genius is that genius has its limits.
When you take things for granted, the things you are granted, get taken.
Even a mosquito doesn't get a pat on the back until it starts to work.
Too many people miss the silver lining because they're expecting gold.
[BES 5.0.3 / GroupWise 2012 HP2]
Offline  
Old 08-09-2010, 12:54 PM   #3 (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

Is this a Java development question?

If so, then yes - you override the onSavePrompt() method in MainScreen.
Offline  
Old 08-09-2010, 03:02 PM   #4 (permalink)
New Member
 
Join Date: Aug 2010
Model: 9800
PIN: N/A
Carrier: A1
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Dougsg38p View Post
Is this a Java development question?

If so, then yes - you override the onSavePrompt() method in MainScreen.
can you explain me the onSavePrompt method?

thx,
-josi
Offline  
Old 08-09-2010, 03:19 PM   #5 (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

See the javadocs for class Screen

Screen.onSave() and Screen.onSavePrompt()
Offline  
Old 08-10-2010, 01:12 PM   #6 (permalink)
New Member
 
Join Date: Aug 2010
Model: 9800
PIN: N/A
Carrier: A1
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I do not have a clue
I read the BlackBerry developers docs but I am a Java noob...

I try following:

public boolean onClose()
{
setDirty(false);
System.exit(0);
return true;
}

protected boolean onSavePrompt()
{
setDirty(false);
System.exit(0);
return true;
}

public void setDirty(boolean dirty){}

public void close(){
return
}

Nothing change

-josi
Offline  
Old 08-10-2010, 02:28 PM   #7 (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

jeez...you took the "shotgun" approach.

Are these methods in your screen class? What screen class are you extending?

As a rule, if you just override onSavePrompt() in MainsScreen and return true, you are done.
Offline  




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