Ok, how weird is this??..

         * Check desktop contains unsaved work
        if(currentDoc.isSaveNeeded()) {
            int i = JOptionPane.showConfirmDialog(this,
                    "Your DOD desktop contains a document with unsaved work.\nAre you sure you want to quit without saving?",
                    "Warning - unsaved work",
                    JOptionPane.YES_NO_CANCEL_OPTION,
                    JOptionPane.WARNING_MESSAGE);
            if(i == JOptionPane.YES_OPTION) {
                this.dispose();
        } else {
            this.dispose();
        }The code above is locaed in my main frame's windowClosing() method to check for unsaved work.
The problem is that this snippet:
if(i == JOptionPane.YES_OPTION) {
this.dispose();
.. always returns true!
I've stopped the app just above with my debugger and confirmed that i==1 while JOptionPane.YES_OPTION==0 - yet it returns true.
I can even change it to i != JOptionPane.YES_OPTION and it will still return true even though nothing else has changed.
? What is my JVM up to today ?

Which version of IntelliJ are you using?
I've got 3.0.3 and have run your test as described:
if (true) {
            int i = JOptionPane.showConfirmDialog(this, "Your DOD desktop contains a document with unsaved work.\nAre you sure you want to quit without saving?", "Warning - unsaved work", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
            if (i == JOptionPane.YES_OPTION) {
                this.dispose();
                System.out.println("HERE");
        } else {
            this.dispose();
        }Even in debug more, the "this.dispose()" line is never highlighted, as you would expect

Similar Messages

  • How weird is this?  InDesign CC drops 20 of my CS6 Myriad Pro sub-fonts!

    Well, I'm  narrowing it down, so I deleted two earlier posts.  It AIN'T Windows 7, and I don't think it's lack of updating Creative Cloud, since I rebooted after that...
    In InDesign CS6 all 32 sub-fonts under Myriad Pro show up, and are usable.
    If I copy them into my newer InDesign CC, twenty of them disappear, and are not accessible!   [See screenshot]
    I can understand why the newer InDesign CC might support fewer fonts, but if I open up InDesign CS6 on MY SAME COMPUTER, at THE SAME TIME, I can still see all 32 of the Myriad Pro sub-fonts, and use them without problems. 
    But I've searched "everywhere" on my system, and can only see the 12 that CC uses.  Any ideas?

    Your encouragement helped me to dig deeper, and I found them in a folder I had looked in the Program Files instead of the Program Files (x86)
    Thanks

  • Weird language on keyboard, how to fix this?

    weird language on keyboard, how to fix this?

    If you see a "globe" key on your keyboard, hold it down to get a list of the activated layouts and select English.

  • When making a circle, illustrator automaticly makes lots and lots of more circles... How to resolve this problem? Really need quick advice!!

    Hi there,
    I have used illustrator now for a long period of time. Recently I purchased Adobe CC. Had no problems with it untill now.
    It's like this. Whenever I try to make a circle (or, square, line or other forms) Illustrator makes lots and lots of more circles within it.
    From the moment I click on the page untill I release my mouse, it keeps making circles. (see enclosed picture)
    I have really no idea whatsoever how to undo this. I have used Illiustrator CC before for another project, and it worked fine. Now however, it doesn't.
    Can anyone help me out here? I have payed projects to deliver, and I really need this to work really soon...
    Thnx for your help!
    btw, I work on a PC with Windows 8. (don't really think it's relevant, but still..)

    Thnx!
    I didn't know that could cause it. Which is actually weird since I've recently bought a new laptop. >,<U
    Thnx for your help!

  • My computer wont recognize my iphone 4. when i plug it into any computer it doesnt charge. i followed the procedure on the website but the device manager still says unknown device. any ideas how to fix this???

    My computer wont recognize my iphone 4. when i plug it into any computer it doesnt charge. i followed the procedure on the website but the device manager still says unknown device. any ideas how to fix this??? the weird thing is it use to work until yesterday. thanks

    Will it charge when connected to a wall outlet? The USB port on your computer must be 2.0
    Powering Apple and third party peripherals through USB

  • Don't know how to fix this - status says no internet connection, yet I'm on the internet.

    So this is a weird one.
    I got this new MacBook Air and the WiFi started up without a hitch.  I had finished migrating from my old computer to my new one and all of a sudden the status bar signal went from full bars to an exclamation point.  The info says Alert: No Internet Connection, yet I am on the internet at full speed.  Even though I have restarted several times, the status in the status bar remains the same.  Since internet is running smoothly, part of me says to forget about it, but it bothers me.
    Does anyone have an idea on how to fix this issue without ruining my internet connectivity on this computer?
    Thanks!

    Migration may have corrupted the network preferences ..
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    /Library/Preferences/SystemConfiguration
    Click Go then move all the files in the SystemConfiguration folder to the Trash.
    See if that makes a difference.
    Your Mac will generate a new SystemConfiguration folder for you.

  • Recently reestablished Google taskbar by following directions from contributer on how to do this re compatability download..forgot what to do so I can put google taskbar on laptop.have it on ff version 6 desktop. thanks

    recently reestablished Google taskbar by following directions from contributer on how to do this re compatability download..forgot what to do so I can put google taskbar on laptop.have it on ff version 6 desktop. thanks

    >
    <IfModule mod_weblogic.c>
    WebLogicCluster 127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7003,127.0.0.1:7103,127.0.0.1:7104
    MatchExpression /app1
    </IfModule>
    <Location /weblogic>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
    DebugConfigInfo ON
    PathTrim /weblogic
    </Location>
    <IfModule mod_weblogic.c>
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    MatchExpression /app2
    </IfModule>
    <Location /weblogic>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    DebugConfigInfo ON
    PathTrim /weblogic
    </Location>
    >
    This configuration is weird little bit. There is MatchExpression /app1 and MatchExpression /app2 and at the same time two <Location /weblogic> sections. Are you sure you understand what that configuration stands for?
    Try something like this ...
    <Location /app1>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
    DebugConfigInfo ON
    </Location>
    <Location /app2>
    SetHandler weblogic-handler
    WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
    DebugConfigInfo ON
    </Location>
    where /app1 and /app2 are contexts of your weblogic applications.
    http://download.oracle.com/docs/cd/E11035_01/wls100/plugins/apache.html
    http://httpd.apache.org/docs/2.0/mod/core.html#location

  • PID.vi - how to use this vi correctly

    I´m trying to control the temperature in an oven using the PID.vi, but I noticed some weird things about using this control...
    I read the oven temperature at every 1 second and input this data at the PID.vi at every 1 second too.  But, I need to make a for loop iterating a bunch of times to really have a good control. If I don´t use this for loop, I can see a really considerable diference comparing to the result of the test I used PID.vi inside the for loop. So, at every 1 second, I read the data, input this data at the for loop, iterate it a bunch of times and I make the average of the results, then I have my PID output.
    I want to know how exactly use this control and what can I be doing wrong? Can somebody send me an example using this vi? How do you do PID control, do you always use this vi or you do it in another way? Please, I really need to make it work properly and I need to make it soon =(
    Tks in advance!

    I am not sure if I understand how and why you are using for loops.
    Normal use of the simple pid.vi would be as shown in the attachment, but I assume that is what you actually doing (without the for loops).
    You just read every second the current value of the temperature and feed this into the PID.vi
    Since in this vi the shift registers are not initialized it will remember the values of the previous time it was called. No need for extra for loops ...
    This method works properly (over a limited temperature range) provided that the P, I and D values are set correctly using for example the Ziegler-Nichols method.
    Then you can add a little bit more 'intelligence' by adding for example the range in which the integration should start, resetting the integration part at an overshoot, different PID parameters for different temperature ranges, ...
    If you are still not happy with it you can also spend some money and buy an external controller or the PID toolkit from NI.
    Good luck!
    Steven
    Attachments:
    PID loop.jpg ‏16 KB

  • Ive lost my apple ID for my ipod, now i have an iphone and i want to use the same apple ID for both can someone tell me how to do this

    I have lost my apple ID for my ipod, now ive got a new iphone and i want to use the same ID for both, can anyone one tell me how to do this? ( i no my ID for the iphone)

    Just use the same ID.
    These may alos help:
    How to use multiple iPods, iPads, or iPhones with one computer
    What is the best way to manage multiple...: Apple Support Communities

  • I locked myself out of my ipod touch for 60 mins then actually typed the wrong password in again.  Now it is telling me to "connect to itunes".  I am unsure how to do this.  I am unable to use my ipod at all now. Please help.

    Hi,
    Due to my brother locking me out of my ipod touch I had to wait an hour to log in again.  Unfortunately when I did this, I, again put in the wrong password twice more, each time locking me out for a further 60 minutes.  On my 3rd attempt to log in the wrong password was entered again.  This time though instead of logging me out for another 60mins it now tells me to "connect to itunes" but I have no idea how to do this and I am now unable to use my ipod.  Please help.

    See Here  >  http://support.apple.com/kb/HT1212

  • I recieve SMS and i hear established melody and I do't hear the person on all over SMS. How to solve this problem?

    Problem with an incoming message. For example, during my conversation the second line receives a call, I hear the sound in dynamics such as "piiiip piiiip," but when in this situation I recieve SMS and i hear established melody and I do't hear the person on all over SMS. How to solve this problem? Perhaps someone tell me? save in advance

    Not Charge
    - See:     
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Recently loaded Lion on my laptop and now my computer crashes often. Black screen and keyboard lights up. Any ideas on what's wrong and how to fix this?

    Recently loaded Lion on my laptop and now my computer crashes often. Black screen and keyboard lights up. Any ideas on what's wrong and how to fix this?

    Everytime this happens Ihave to power down and restart! Any ideas would be appreciated!

  • I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's  drop list, anyone has an idea as how to resolve this issue

    I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's  drop list, anyone has an idea as to how to resolve this issue

    I'm not that familiar with how FaceTime works. I know how to set It up but I don't use it. I just know that you can't activate in the UAE. I believe that you can activate in any country that permits it's use. Whether you will need a new ID or not, I can't confirm.
    You can Google this and get all sorts of articles on workarounds. Apparently if you set up a VPN you can use it in the UAE. Here is one article that I found.
    http://talkfree7.blogspot.com/2010/09/how-to-facetime-voip-call-from-uae.html
    I Googled "workaround for FaceTime in UAE" to find this.

  • After moving to iCloud I can only get my email through the cloud, no new emails are making it to my home computer. Does anyone have any advice on how to fix this issue?

    After moving to iCloud I can only get my email through the cloud, no new emails are making it to my home computer and .mac account. Does anyone have any advice on how to fix this issue?

    Welcome to the Apple Community.
    Which OS are you using.

  • My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    Hello there philp_69,
    If I understand correctly it sounds like your phone hasnt been recognized in iTunes on your PC since the last couple of updates. I would use the troubleshooting in the following article which will walk you through the steps one by one. 
    iPhone, iPad, or iPod touch not recognized in iTunes for Windows
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

Maybe you are looking for

  • MacBook Air or Pro for iMovie editing?

    I am getting a Macbook. I want the air, but i'm concerned that there won't be enough GHz for the imovie projects that I create. Is the air good enough? Or should i get the pro? Thanks in advance.

  • Creating Infoset query based on ABAP program

    Hello I have 3 tables FEBEP, BKPF and BSEG and I need to join the 3 tables based on: FEBEP-MANDT = BKPF-MANDT = BSEG-MANDT FEBEP-NBBLN = BKPF-BELNR = BSEG-AUGBL FEBEP-GJAHR = BKPF-GJAHR = BSEG-GJAHR Then I have a few view fields from all the 3 tables

  • Memory Leak/Track Pad/Mouse and Headphone Jack

    Help- I have a Macbook with the intel core duo. 4 GB of RAM. Context. Computer is used as a media server. Stereo is connected via an optical link from the headphone jack to an external digital to audio converter. Music is stored on external 1 TB My b

  • Qosmio F10: ERROR: "Unable to ACPI Name Space!"

    The original motherboard with 855PM chipset was exchanged at Toshiba German service during the warranty period for the new one with another chipset (915 or 910). The Toshiba "Common modules" were successfully running with the new motherboard until th

  • Using Macbook Pro Power Adapter on a Macbook

    I have a Macbook Pro and someone else in my family has a Macbook. Recently they misplaced their power adapter and started borrowing mine to use until theirs was found. I was uneasy about it, but it seemed to work okay. I know that the adapters are sl