• 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
NSWorkspaceDidTerminateApplicationNotification not being posted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWorkspaceDidTerminateApplicationNotification not being posted


  • Subject: NSWorkspaceDidTerminateApplicationNotification not being posted
  • From: Dominic Feira <email@hidden>
  • Date: Tue, 12 Dec 2006 19:13:05 -0500

Hello.

I'm working on an app that registers for both:
NSWorkspaceDidLaunchApplicationNotification
NSWorkspaceDidTerminateApplicationNotification

The didLaunch comes through correctly at all times. However, the didTerminate notification sometimes does not post. In an effort to be thorough, I logged the events by overriding [NSApplication sendEvent:]. ProcessNotification event's are posted correctly for applications launching, but not quitting. For whatever reason cocoa is not being notified of the change.

I was able to trace the cause of this to the execution of the applescripts via NSAppleScript. I switched to executing the scripts via OSAScript, yet the problem persists. If I disable the execution of Applescript's everything goes back to normal.

To make things even more bizarre, the Carbon equivalent to NSWorkspaceDidTerminateApplicationNotification, {kEventClassApplication, kEventAppTerminated} works at all times, as expected, regardless of the execution of Applescripts.

Has anybody else ever run into this? Does anybody have any ideas or strategies how to debug this further? Any feedback is greatly appreciated. I've spent considerable time trying to figure this out. For now I am using the carbon notification so I can get some other things done.

Dominic Feira / Code Monkey / Ambrosia Software, Inc.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSWorkspaceDidTerminateApplicationNotification not being posted
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: [Q] Windows code page list?
  • Next by Date: Re: NSWorkspaceDidTerminateApplicationNotification not being posted
  • Previous by thread: [Q] Windows code page list?
  • Next by thread: Re: NSWorkspaceDidTerminateApplicationNotification not being posted
  • Index(es):
    • Date
    • Thread