• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Make it quit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make it quit


  • Subject: Make it quit
  • From: "John C. Welch" <email@hidden>
  • Date: Thu, 31 Mar 2011 21:34:47 -0400
  • Thread-topic: Make it quit

Title: Make it quit
So my Kext List application is doing something odd. If I wait until it's done processing data, the "quit when you close the window" functionality works correctly.

If however, I close the window while it's running, the application doesn't quit and will sit there forever, windowless. I'm a bit mystified, as this is the first time I've seen

    on applicationShouldTerminateAfterLastWindowClosed_(sender)
        return true
    end applicationShouldTerminateAfterLastWindowClosed_

not work correctly. It almost looks like that handler's not executing. Per Shane's advice, I am running:

    on doEventFetch() --this allows the UI to remain responsive during execution
        repeat
            tell current application's NSApp to set theEvent to nextEventMatchingMask_untilDate_inMode_dequeue_(current application's NSUIntegerMax, missing value, current application's NSEventTrackingRunLoopMode, true)
            if theEvent is missing value then
                exit repeat
                    else
                tell current application's NSApp to sendEvent_(theEvent)
            end if
        end repeat
    end doEventFetch

Which has made the application FAR more responsive during the heavy do shell script bits, but, I’m kind of at a loss as to what’s really happening here.


Any thoughts?

--
"Again, in basic training we had been forbidden to say please or thank you, as such words implied the existence of kindness, benevolence, or charity."
- Mouthful of Rocks, by Christian Jennings, about Foreign Legion boot camp.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Which sender is which
  • Previous by thread: Re: Which sender is which
  • Index(es):
    • Date
    • Thread