> On Dec 18, 2019, at 11:10 AM, Carl Hoefs via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> Thanks for the suggestion. Apple docs have [[[NSWorkspace sharedWorkspace] 
> notificationCenter] in their code snippets.

The docs for that property say that it's only for use with the notifications 
declared in NSWorkspace.h.

> But [NSNotificationCenter defaultCenter] doesn't work either. Very odd. 

Usually that's the right notification center for anything not otherwise 
specified, so that's weird.
The only other notification center I know of is 
NSDistributedNotificationCenter, but that isn't used for much.

> Might there be some way in Xcode or Console to see what notifications are 
> being fired?

If you add an observer with a notification name and object of nil, it will 
receive all notifications sent to that center.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to