Wake from sleep notifications and preventing idle sleep
Wake from sleep notifications and preventing idle sleep
- Subject: Wake from sleep notifications and preventing idle sleep
- From: Philip Dow <email@hidden>
- Date: Tue, 21 Mar 2006 19:53:49 +0100
I've never beeng able to get the NSWorkspaceDidWakeNotification to
work, and I was going to post to the list asking about this but first
did some extra research and came up with a wrapper class that
provides the functionality I was looking for.
Since this may be useful to others, I'd like to share it. The class
also happens to be the first entry in what I hope to be a useful
database of cocoa code that I've recently written.
The class posts a notification when the computer is about to sleep or
when waking from sleep. It also implements a delegate method that can
prevent idle sleep from happening, if for example your program needs
to complete a lengthy operation without being interrupted.
For more info about the class: http://developer.phildow.net/cocoa-
code/pdpowermanagement/
Feel free to use it in any way you can.
-Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden