Re: NSWorkspace notifications related to time change
Re: NSWorkspace notifications related to time change
- Subject: Re: NSWorkspace notifications related to time change
- From: Jens Alfke via Cocoa-dev <email@hidden>
- Date: Wed, 18 Dec 2019 13:18:23 -0800
> On Dec 18, 2019, at 11:10 AM, Carl Hoefs via Cocoa-dev
> <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden