Which Event is invoked on clicking the Close button of AIR Window

Hello
I am trying to capture the event; which is invoked when we close the AIR window by clicking its Close button (on the top-right corner). I have tried the following; but none of them seems invoked:
Code:
newWin.stage.addEventListener(Event.CLOSING, closeHandler);
newWin.stage.addEventListener(Event.EXITING, closeHandler);
newWin.stage.addEventListener(Event.REMOVED, closeHandler);
newWin.stage.addEventListener(Event.DEACTIVATE, closeHandler);
newWin.stage.addEventListener(Event.REMOVED_FROM_STAGE, closeHandler);
The code for the said problem is something like the following:
Code:
var initOptions: NativeWindowInitOptions = new NativeWindowInitOptions();
initOptions.systemChrome = NativeWindowSystemChrome.STANDARD;
var newWin: NativeWindow = new NativeWindow(initOptions);;
newWin.stage.addEventListener(Event.CLOSING, closeHandler);
Would anybody kindly help!

I wonder, no geek came forward for rescue! I am still hopeful to get a response from Adobe AIR wizards.

Similar Messages

  • What should I do if the iphoto keeps on saying that "Plz wait for import to complete" when i click the close button but it is not importing photos? How can I close the iPhoto? I try to switch my mac off but it doesn't work. Thanks.

    What should I do if the iphoto keeps on saying that "Plz wait for import to complete" when i click the close button but it is not importing photos? How can I close the iPhoto? I try to switch my mac off but it doesn't work. Thanks.

    You should be able to select Force Quit from the menu beneath the Apple icon in Finder
    and choose to Quit iPhoto from there, without messing up the Mac OS X in the process.
    OS X - Support
    Not sure if rebuilding the iPhoto library would help this issue. However if you had to
    turn off the computer without the correct method (unplug, etc; instead of menu choice)
    the system may have accrued damages and should be checked, maybe repaired by
    use of the Disk Utility in the system. Or restart the computer in Safe Boot mode, then
    run 'repair disk permissions' while it is running in that reduced mode; then restart after.
    •Understanding Safe Mode - tuts+ computer skills tutorial:
    http://computers.tutsplus.com/tutorials/understanding-safe-mode--mac-59897
    •OS X: What is Safe Boot, Safe Mode?
    Suggestions on how to use Safe Mode in article, to resolve issues, may be helpful.
    There likely are other means to rectify troublesome applications, including reinstall.
    Be sure to backup your music, image, video, and other work on an external drive
    or suitable device as a precaution against loss should there be a hard drive failure.
    iPhoto - Mac Apps - Apple Support
    There should be some tips and help information using iPhoto via this tiny Support link.
    Good luck & happy computing!

  • How to restrict closing the tab in tabpane after clicking the close button.

    Hi all,
    Greetings.
    I am implementing a TabPane with different 'user form's in each Tab. And all the tabs are *'closable'*.
    If the user enters some data in the form, and tries to close the tab without saving the form , i need to show a confirm dialogue box that the user should go ahead or not.
    If he clicks cancel, the tab should not close.
    But currently i am searching for a method something like 'setOnClosing' method for tab.
    There is only tab.setOnClosed() method, which will call the event after closing the tab.
    Some thing the code is like below.
    tab.setOnClosed(new EventHandler<javafx.event.Event>() {
         @Override
         public void handle(javafx.event.Event e) {
            // TODO: Actions to be taken on close of tab.
               // Logic to show the confirm dialouge box.
               //  if YES - close the tab
               //  if NO - don't close the tab.
    });But my logic is executing after closing the tab. (ofcourse, as it is on setOnClosed() ;) ). Can anyone tell me how to get control before closing the tab ?
    Thanks in Advance.
    Sai Pradeep Dandem.

    Hi All,
    Finally I managed to get the handler before closing the tab pane. :)
    Though this is a bit weird work around, my requirement is fulfilled at-least.
    Let me explain the workaround I did.
    Tab tab = new Tab(title);
    tab.setClosable(false); // This line of code  makes sure that the “default” close button of the tab is not appeared.
    setClosableButton(tab);Then I am setting the custom close button as a graphic to the label ( Title of the tab), and aligning that graphic position to make an effect, that it is rendered exactly at the position of “Close” button.
    From this Custom Close Button, I am handling the events and if confirmed I am closing the tab manually, by calling the closeTab() method in the TabPaneBehavior class.
    Below is the code that is implemented as per the above logic.
          * Method to set the custom Closable Button to the given tab.
          * @param tab - Tab
         private void setClosableButton(final Tab tab,final boolean closeCheck){
              final StackPane closeBtn = new StackPane(){
                   @Override
                   protected void layoutChildren() {
                        super.layoutChildren();
                        // Setting the orientation of graphic(button) to the right side.
                        ((Label)((LabelSkin)getParent()).getSkinnable()).setStyle("-fx-content-display:right;");
              closeBtn.getStyleClass().setAll(new String[] { "tab-close-button" });
              closeBtn.setStyle("-fx-cursor:hand;");
              closeBtn.setPadding(new Insets(0,7,0,7));
              closeBtn.visibleProperty().bind(tab.selectedProperty());
              final EventHandler<ActionEvent> closeEvent = new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent paramT) {
                        ((TabPaneSkin)TabPaneComponent.this.getSkin()).getBehavior().closeTab(tab);
              // Handler for the close button.
              closeBtn.setOnMouseReleased(new EventHandler<MouseEvent>() {
                   @Override
                   public void handle(MouseEvent paramT) {
                        // My logic to handle the close event or not.
                                    if( logic satisfied){
                             closeEvent.handle(null);
                                    }else{
                                           // Dont close the tab.
              // Showing the close button if the tab is selected.
              tab.selectedProperty().addListener(new ChangeListener<Boolean>() {
                   @Override
                   public void changed(ObservableValue<? extends Boolean> paramObservableValue,Boolean paramT1, Boolean isSelected) {
                        if(isSelected){
                             tab.setGraphic(closeBtn);
                        }else{
                             tab.setGraphic(null);
         }There are some drawbacks in the above code. In practice, it is suggested not to use the classes (*LabelSkin* & TabPaneSkin) that are in com.sun.javafx package. But I couldn’t get a better solution other than using those classes. And another one is I could'nt set the actual graphic for tab, as i am already using that graphic property to show the close button.
    I would like to thank Narayan, for giving some inputs which has helped me to think and get the above solution. :)

  • When I get directions from Mapquest and click the "print" button, a new window opens but it is blank. How do I fix this? Thanks

    When I click the "print" button a simplified set of directions should pop up for me to print.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • How can I stop a JFrame from closing when clicking the close button.

    I need to display a dialog when a user attempts to close my app, giving them the option to close, minimize or cancel. How can I stop the form from closing after the user makes his selection? I have the folllowing code, but my form still closes after selecting an option:
    private void formWindowClosing(java.awt.event.WindowEvent evt) {                                  
            //An array of Strings to be used a buttons in a JOptionDialog
            String[] options = {"Close", "Minimize", "Cancel"};
            //Determines what the user wants to do
            int result = JOptionPane.showOptionDialog(null, "What to you want to do?  Close the application, minimize or cancel?", "Please select an option...", 0, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
           //Determines what to do, depending on the user's choice
            if (result == 0) {
                //Close the application
                System.exit(0);
            } else if (result == 1) {
                //Minimize the application
                this.setState(Frame.ICONIFIED);
        }Any help would be much appreciated!

    import java.awt.event.*;
    import javax.swing.*;
    public class test extends JFrame {
         public static void main( String[] args ) {
              new test();
         public test() {
              setSize( 200, 200 );
              //the next line makes the JFrame not close
              setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
              //now add a listener that does the trick
              addWindowListener( new WindowAdapter() {
                        public void windowClosing( WindowEvent e ) {
                             //ask the user and do whatever you wish
              setVisible( true );
    }

  • After the latest update to FF13, I double click the bookmark button and the window won't open so I can edit.

    When I double click the bookmark button (star) a window always drops down so I can edit the bookmark or place it into the folder I want. Now after the latest update to FF13 (june 2012) I can click once and the page is bookmarked to the "unsorted" folder, but when I double click nothing happens. 1) I restarted FF, didn't help 2) I rebooted computer, didn't help.

    Thank you very much for pointing me in the right direction. I had 5 extensions installed. I disabled all of them then restarted FF. My bookmark window started working again. Then I enabled each extension one at a time to find the culprit. It was "Compact Menu 2 version 4.3.1". It's a handy extension for me, but I can live without it till they have a version that will work for me. Thanks again.

  • When a third party program creates a new Google calendar event using a http link I cannot click the save button in Firefox 9.01 or 10b2.

    I use a TV listings program called DigiGuide. This has a script that opens a new Google Calendar event page in my browser for a specified TV program with all fields already completed. I then just have to click the SAVE button on the Google Calendar site to save the event - but since updating to 9.01 from 8.xx this button and others (Discard, Search) has no effect, although the cursor changes when over the button as if it recognised a link. Opening the same page in Chrome works fine. I have also noticed that Calendar's other buttons (e.g. next/previous period) can stop working on the main Calendar page, which I have as a pinned tab - in this event navigating away from Calendar and back again regains that functionality. The issue persists in Firefox 10b2.

    Further investigation reveals this only happens when the event is created from within WP native calendar app and disappears when I make an edit to the event in any other calendar client including Google web. So a more appropriate description of the problem would be:
    "Native calendar app keeps subtracting 1h off a Google calendar event on EVERY edit"
    Create an event at 2013/07/17 15:00 in WP native calendar app. Result: Event shows as 2013/07/17 15:00 in the calendar app for a few seconds, then updates itself to 2013/07/17 14:00.
    Edit the event title and save in WP native calendar app. Event time moves by -1h again to 2013/07/17 13:00.
    Edit the event title in Google web calendar.
    Subsequent edits in WP native calendar do not mess up the time any longer. If I fix the time to what I originally intended (2013/07/17 15:00) in WP native calendar app, it stays there and shows correctly in all previously mentioned calendar viewers.
    I just learned that Lumia 925 was released with GDR2 update pre-installed. This update is only now being made generally available. If the issue is secific to the CalDAV implementation in GDR2 rather than specific to my phone only, this would make a lot of angry people. I hope I'm wrong on this though as it's an extremely frustrating problem.

  • How can I automatically close a dialog box using Javascript after I click the OK button to submit it?

    How can I automatically close a dialog box using Javascript after I click the OK button to submit it? I don't want to have to X out of the dialog box after I am done.
    Thanks
    Linda

    JS can not interact with open dialogs in any way, unless it's a dialog
    created in JS using the Dialog object.
    On Thu, Jul 24, 2014 at 11:13 PM, lindaeliseruble <[email protected]>

  • I have iphone 5s which when i connect to import the pictures directly to my windows computer. a folder by the name of my phone appears in "My Computer" . when i open it, it shows the storage information and one icon to click on. when opened it shows

    i have iphone 5s which when i connect to import the pictures directly to my windows computer. a folder by the name of my phone appears in "My Computer" . when i open it, it shows the storage information and one icon to click on. when opened it shows a couple of folders to click upon to view pictures. when i open the pictures folder and delete all the pictures , even then a lots of unclickable windows icons remain
    i have attached the picture of that window's screenshot. plus when ever i try deleting them it says,
    please help!.. i shall be really thankful.
    iPhone 5s, iOS 8

    I have the same issue and it has to do with iOS 8.2
    Apple, please mend this ASAP. Really stupid change since iOS 8.1
    If you for some reason must have many different folder make sure that you put the newst photo in the last folder so one can easily find a photo when I don't want to copy all photos to, let' say, my friend computer.

  • When a website launches a new window to enter information, Firefox no longer automatically closes the window when you click the submit button. Why?

    For example, when I create a message in my autoresponder service and want to attach an image a new window opens up so I can enter the details of the image (url, position, alt text). When I click the Save button, the information is captured but the window remains open and I have to manually close it.
    Firefox used to close the window automatically.

    YES!! Thank you jscher2000! You sir are a legend. Thanks for this, changed the newtaburl in about:config, totally worked. Nope, never saw it happening! Speedy machine this one :P Yep, that change completely sorted the issue, just opened about 741 new tabs through the shortcut on my mouse just to celebrate. Thanks guys who helped, no thanks those who didn't.

  • Firefox 4 Beta (v9,10&11) opens on my PC (Win 7) and creates tabs but only the close button works I cannot click on any tabs or content in the "active" tab?

    It looks like Firefox has started ok, all the tabs are populated, but nothing can be accessed by clicking except the Close button and the right hand scroll bar... it is frustrating. Firefox 3 works fine still.

    Create a new profile exclusively for the 4.0 beta version and create a desktop shortcut with -P "profile" appended to the target to launch that profile.
    * http://kb.mozillazine.org/Testing_pre-release_versions
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    * http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

  • I just did an update to 6.0 on Lion. Now when I re-open Safari after closing it by clicking the red button  it re-opens to my home page, not all my previous tabs..  prior to the update it would re-open with all my previous tabs, which is what I want.

    I just did an update to Lion  10.7.4 with Safari  6.0. Now when I re-open Safari after closing it by clicking the red button,  it re-opens to just my home page, not to all my previous tabs as it did before the update.  I prefer having my old tabs re-open.  How can I fix this?

    I've had what I think is the same problem since the most recent software update.  I have Lion 10.7.4 and have updated to Safari 6.0.  The most noticeable difference is that where previously I had two boxes at the top of the Safari window (one to enter URL addresses, one for Google searches), there is now only one box for both functions.  I don't like that as well, but I can live with it.  However, since the most recent software update my "back button" only works about 5% of the time. Most of the time it is grayed out.  So I usually can't get back to previous pages using the back button.  Also, when I've clicked a link that opens a new window (for instance, going through the return process at Amazon, I clicked UPS locator and it opened a new window), where in the past I would have just clicked the red button after I had the information, the UPS locator window would have closed, and I would have been back at Amazon - now if I close the UPS locator window, all Safari windows close.  The Safari application doesn't close, but the Amazon window closes, I'm back to an empty screen, and I have to open a new Safari window and reenter everything.  I'm using a work-around of clicking on History and selecting the description of the window I want to get back too, but that only works part of the time. In the Amazon example, that's what I did once I had the UPS info, but even though I clicked the correct window description, it took me back to the beginning of the return process & I had to reenter all the info.  Of course, that info was easy to reenter, but if I'm in the middle of a complicated process, it's a big problem.  I've filed a bug report; I surely hope the Apple engineers are able to fix this.  I'm used to using the back button function a lot!

  • HT4623 How do I close apps running in the background....I have tried double clicking the home button and then the swiping up and it does not work???

    I just updated my phone and can not close the running apps. Battery dying fast. I did try double clicking the home button but swiping up did not work??

    With iOS 7, swiping the application thumbnail up the screen does close the app.

  • HT201365 Before I downloaded the iOS 7 upgrade I could turn off the apps that were running in the background by double clicking the bottom button to bring up the apps. I would hold down on 1 app, X's would appear on each and then I could close them. How N

    Before I downloaded the iOS 7 upgrade I could turn off the apps that were running in the background by double clicking the bottom button to bring up the apps. I would hold down on 1 app, X's would appear on each and then I could close them. How Now?

    and
    Because my first response would be....Oh, sure.....
    Because I am sorry you are having a hassle with the intenet. There is nothing more frustruating than having to deal with a slow response, or a makeshift connection....hope it gets fixed soon!!!
    Your friend,
    GB

  • How do you close apps you hve looked at with the new software update?? You used to have to double click the home button and the apps would come up to delete bu that doesn't happen anymore.

    How do you close apps you hve looked at with the new software update?? You used to have to double click the home button and the apps would come up to delete bu that doesn't happen anymore.

    The apps in the multitaskbar should appear like pages on the whole display. To close them, just swipe from the bottom to the top. you can select single apps for closing, when you swipe them like you would swipe your homescreens.

Maybe you are looking for

  • How to set a default value in MARA field 'Old material number'

    Hello everyone, I have a requirement to fill automatically the field MARA-BISMT (Old material number), when creating a new material (using for example MM01). What is the best way to do it? My idea is to have somewhere a field exit (?) with some ABAP

  • [SOLVED] Thunar folder icon image preview?

    Is it possible to get Thunar to show previews of the images inside of a folder on the folder thumbnail icon? I have been trying to determine this on and off for a few months now, but I can't find anything. I would like this to happen automatically, n

  • Extract app from mac mini

    how can i install iphoto (ilife 08) from a new mac mini to my G5 imac ?

  • Specifying certain contact groups to sync to iPhone via Mobile Me?

    I'm hoping someone has an answer to this question. Pre MobileMe, I could specify in iTunes which groups of contacts (from Address Book) to sync to my iPhone. Now, I seem to have no control over this, resulting in about 1300 contacts on my iPhone. Nee

  • U2414H, HDMI to HDMI compatibility?

    I am interested in purchasing the U2414H Monitor & have a few questions. I am sorry to say, but the Dell Support team in India is just not able to answer my queries. Really hope you would be able to solve them. My queries are : 1) I have the followin