• 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: James Walker via Cocoa-dev <email@hidden>
  • Date: Wed, 18 Dec 2019 10:35:49 -0800

On 12/18/19 9:55 AM, Carl Hoefs via Cocoa-dev wrote:


However, I cannot get this notification to fire on system time changes. My
other notifications (such as sleep wake, etc) do fire.

-Carl


     [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: self
             selector: @selector(systemTimeChanged:)
             name: NSSystemClockDidChangeNotification object: NULL];


-(void) systemTimeChanged: (NSNotification *) notification
{
     NSLog(@"-systemTimeChanged: %@", [notification name]);
}

I'm not sure what that workspace notification center is for. Maybe try [NSNotificationCenter defaultCenter].
_______________________________________________

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

  • Follow-Ups:
    • Re: NSWorkspace notifications related to time change
      • From: Carl Hoefs via Cocoa-dev <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>)

  • 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