• 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
Re: NSWorkspace notifications related to time change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSWorkspace notifications related to time change (From: Carl Hoefs via Cocoa-dev <email@hidden>)
 >Re: NSWorkspace notifications related to time change (From: Steve Mills via Cocoa-dev <email@hidden>)
 >Re: NSWorkspace notifications related to time change (From: Carl Hoefs via Cocoa-dev <email@hidden>)
 >Re: NSWorkspace notifications related to time change (From: James Walker via Cocoa-dev <email@hidden>)
 >Re: NSWorkspace notifications related to time change (From: Carl Hoefs via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: NSWorkspace notifications related to time change
  • Next by Date: Re: NSWorkspace notifications related to time change
  • Previous by thread: Re: NSWorkspace notifications related to time change
  • Next by thread: Re: NSWorkspace notifications related to time change
  • Index(es):
    • Date
    • Thread