• 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: NSTimers and sleeping mac's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimers and sleeping mac's


  • Subject: Re: NSTimers and sleeping mac's
  • From: "Sean McBride" <email@hidden>
  • Date: Sat, 28 Jul 2007 15:51:00 -0400

Keith Duncan (email@hidden) on 2007-07-27 12:10 said:

>I was aware of having to register for sleep/wake notifications but not
>the change in time ones. Where can you register for these
>notifications? I couldn't find them in NSWorkspace where I would've
>expected them.

I don't think there's any way with Cocoa notifications, but you can with
Carbon Events.  Here's a snippit:

	EventTypeSpec eventType;
	eventType.eventClass = kEventClassSystem;
	eventType.eventKind = kEventSystemTimeDateChanged;

	EventHandlerUPP eventHandlerUPP =
    NewEventHandlerUPP(DateChangeEventHandler);
	EventHandlerRef	eventHandlerRef = NULL;
	(void)InstallApplicationEventHandler(
		eventHandlerUPP,
		1,
		&eventType,
		self,
		&eventHandlerRef);

Sean

--
"But if the answer isn't violence, neither is your silence" - Pop Will
Eat Itself


_______________________________________________

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: 
 >NSTimers and sleeping mac's (From: Aaron Wallis <email@hidden>)
 >Re: NSTimers and sleeping mac's (From: "Sean McBride" <email@hidden>)
 >Re: NSTimers and sleeping mac's (From: Keith Duncan <email@hidden>)

  • Prev by Date: Re: Changing the app language
  • Next by Date: Re: Changing the app language
  • Previous by thread: Re: NSTimers and sleeping mac's
  • Next by thread: NSURLConnection/NSURLDownload max simultaneous connections
  • Index(es):
    • Date
    • Thread