Loading ...
Sorry, an error occurred while loading the content.

Info on Fixing the Mac OS X Quit problem

Expand Messages
  • gardnern80020
    So I went digging around on the Apple Developer Documentation site and found a few good references Two for Java 1.3: Handling the Quit and Preferences in the
    Message 1 of 5 , Jul 1, 2003
    • 0 Attachment
      So I went digging around on the Apple Developer Documentation site and
      found a few good references Two for Java 1.3:

      Handling the Quit and Preferences in the "Application" menu:
      http://developer.apple.com/documentation/Java/Conceptual/Java131Development/value_add/chapter_6_section_4.html

      and Java 1.4:
      http://developer.apple.com/documentation/Java/Conceptual/Java141Development/Native_Integration/chapter_8_section_2.html#//apple_ref/doc/uid/TP30000296/BCIBDHFJ

      The 1.4 refers the reader to the OS X Project builder. I'd be happy
      to pass along any files you may want or think are relavent. I took a
      look but only having played with java on an extremely limited basis
      its lots of greek to me. Relavent calls appear to be:

      public class Test extends JFrame
      implements ActionListener,
      MRJAboutHandler,
      MRJQuitHandler {

      // Within which lives
      public Test() {
      MRJApplicationUtils.registerAboutHandler(this);
      MRJApplicationUtils.registerQuitHandler(this);
      }

      public void handleAbout() {
      aboutBox.setResizable(false);
      aboutBox.setVisible(true);
      aboutBox.show();
      }

      public void handleQuit() {
      System.exit(0);
      }
      // Other possibly relavent stuff omitted for brevity

      There is also a "Preferences" menu item in this menu. They do not
      appear to try to handle this in the demo application.

      Hope this helps, if you need more information feel free to contact me.

      -Nate
    • Jayme Cox
      ... While this is a very elegant solution, it requires that PCGen re-distribute the MRJToolkitStubs library, as it probably won t be present on any OS other
      Message 2 of 5 , Sep 16, 2003
      • 0 Attachment
        gardnern80020 wrote:

        > Handling the Quit and Preferences in the "Application" menu:

        > public Test() {
        > MRJApplicationUtils.registerAboutHandler(this);
        > MRJApplicationUtils.registerQuitHandler(this);
        > }
        >
        > public void handleQuit() {
        > System.exit(0);
        > }

        While this is a very elegant solution, it requires that PCGen
        re-distribute the MRJToolkitStubs library, as it probably won't be
        present on any OS other than Mac.
      • Jayme Cox
        After doing some more investigation, I think I ve found a way around the problem. I ve checked in code for next release which should allow Mac uses to use the
        Message 3 of 5 , Sep 16, 2003
        • 0 Attachment
          After doing some more investigation, I think I've found a way around the
          problem. I've checked in code for next release which should allow Mac
          uses to use the apple %Quit menu and it will still save your settings.

          --Jayme
        • Eddy Anthony
          Didn t seem to work Jayme. I ve just got 5.3.9 and when I quit using the OSX Menu the program hangs displaying the spinning beach ball of doom and making a
          Message 4 of 5 , Sep 19, 2003
          • 0 Attachment
            Didn't seem to work Jayme.
            I've just got 5.3.9 and when I quit using the OSX Menu the program hangs
            displaying the spinning beach ball of doom and making a force quit
            necessary. I appreciate your efforts but I had actually had gotten used to
            the behavior and liked being able to quit with no fuss, when I knew if I
            needed to save the prefs I'd go to the file menu. This however is somewhat
            inconvenient.
            -Eddy

            > After doing some more investigation, I think I've found a way around the
            > problem. I've checked in code for next release which should allow Mac
            > uses to use the apple %Quit menu and it will still save your settings.
            >
            > --Jayme
          • Jayme Cox
            ... Hmm, that s to bad. Ok, I ve removed the offending code and checked into CVS for next release and autobuild
            Message 5 of 5 , Sep 20, 2003
            • 0 Attachment
              Eddy Anthony wrote:
              > I've just got 5.3.9 and when I quit using the OSX Menu the program hangs
              > displaying the spinning beach ball of doom and making a force quit
              > necessary. I appreciate your efforts but I had actually had gotten used to
              > the behavior and liked being able to quit with no fuss, when I knew if I
              > needed to save the prefs I'd go to the file menu. This however is somewhat
              > inconvenient.

              Hmm, that's to bad. Ok, I've removed the offending code and checked into
              CVS for next release and autobuild
            Your message has been successfully submitted and would be delivered to recipients shortly.