shadowfist
unread,Nov 4, 2009, 3:07:14 PM11/4/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Merapi
If you want to run code that may prevent the AIR application from
closing in the closing event and you don't want to have the bridge
close - you will have to do a few things.
1. you will have to add the event listener for the closing via code
and give it a priority greater than 0. You cannot use the
"closing=foo" in the mx:WindowedApplication tag. (e.g.
Application.application.addEventListener(Event.CLOSING,
onCloseAppHandler, false, 10, true);)
2. in your closing event handler, if you want to stop the bridge from
closing, you will have to call the event stopImmediatePropagation()
function. if you don't call this function on the event object, the
bridge will close.
by setting the priority of the event listener greater than 0, you
ensure that your closing event handler happens before the Bridge's
closing event handler. This will give you the opportunity to prevent
the bridge from closing.
Just an FYI that I figured out today.