• 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: Sleep Notification?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sleep Notification?


  • Subject: Re: Sleep Notification?
  • From: John Timmer <email@hidden>
  • Date: Tue, 26 Aug 2003 23:00:58 -0400

> On Tuesday, August 26, 2003, at 07:01 PM, Andreas Mayer wrote:
>> Am Mittwoch, 27.08.03 um 01:57 Uhr schrieb email@hidden:
>>> Is there any notification that can notify an app that the computer is
>>> about to go to sleep?
>>
>> Not yet. You will have to wait for Panther.
>
> You _CAN_ do it in Jaguar, though. Check out the RegisterForSleep
> Cocoa example code provided with the OS X PM (Power Management) SDK.
> Go download the SDK, and you should be able to get it working on Jaguar
> (or even 10.1 for that matter) pretty quickly...you can get
> notification of (1) about to go to sleep, (2) just woke up, and (3) you
> can say yes/no to "can system go to sleep" so as to prevent sleep from
> happening. The third can be nice if you want to finish something that
> can't or shouldn't be interrupted.


I've already got this wrapped in a pretty simple class that allows you to
register objects for receiving notifications, provided they implement an
appropriate method. I can send you the code if you'd like, but, since I'm
using it, I can't have it re-released under GPL, or under a commercial
license without some sort of agreement.

Let me know if you'd like to take a look.

JT
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Sleep Notification? (From: Don Yacktman <email@hidden>)

  • Prev by Date: Re: Sleep Notification?
  • Next by Date: Re: How to display an EPS file?
  • Previous by thread: Re: Sleep Notification?
  • Next by thread: Re: Sleep Notification?
  • Index(es):
    • Date
    • Thread