Re: NSWorkspaceDidTerminateApplicationNotification not being posted
Re: NSWorkspaceDidTerminateApplicationNotification not being posted
- Subject: Re: NSWorkspaceDidTerminateApplicationNotification not being posted
- From: Dominic Feira <email@hidden>
- Date: Tue, 12 Dec 2006 19:31:09 -0500
No it doesn't. The registration for
NSWorkspaceDidTerminateApplicationNotification occurs in an
awakeFromNib currently. I tried moving it into an init instead of
awakeFromNib, as I have run into other issues with NSAppleScript and
using it from within awakeFromNib.
Dominic Feira / Code Monkey / Ambrosia Software, Inc.
On Dec 12, 2006, at 7:21 PM, Nick Zitzmann wrote:
On Dec 12, 2006, at 5:13 PM, Dominic Feira wrote:
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.
This is just a guess, but does your application call either
NSApplicationMain() or NSApplicationLoad() before using
NSWorkspace? The behavior of NSWorkspace is completely
unpredictable if you do not initialize the AppKit properly first.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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