Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 71
Registered: ‎04-27-2011
My Device: Bold 9700 and Playbook 64
My Carrier: Rogers
Accepted Solution

stage.nativeWindow.close() Exit or Quit an app programatically

can't seem to get the following:

 

stage.nativeWindow.close();

 

to work within a class.  I know I have to refer to the parent or root stage somehow... not sure how.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: stage.nativeWindow.close() Exit or Quit an app programatically

hey,

 

try using this line instead and see if it does what you are looking for:

 

 

NativeApplication.nativeApplication.exit()

 

good luck!

 

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Highlighted
Developer
Posts: 71
Registered: ‎04-27-2011
My Device: Bold 9700 and Playbook 64
My Carrier: Rogers

Re: stage.nativeWindow.close() Exit or Quit an app programatically

works like a charm... tnx.

 

in case anyone stumbles on this.

 

tried this before and no luck...  forgot to import the below class:

import flash.desktop.NativeApplication;