Re: Wakeup/Sleep?
Re: Wakeup/Sleep?
- Subject: Re: Wakeup/Sleep?
- From: Jerry LeVan <email@hidden>
- Date: Wed, 17 Mar 2004 15:52:12 -0500
It is my understanding that NSCalendarData is a subclass of NSDate...
I also tried
NSCalendarDate *now = [NSCalendarDate calendarDate];
NSDate *plus30Sec = [now dateByAddingYears:0 months:0
days:0 hours:0 minutes:0 seconds:30];
using an NSDate got the same error code...
--Jerry
On Mar 17, 2004, at 3:47 PM, Nicko van Someren wrote:
On 17 Mar 2004, at 18:45, Jerry LeVan wrote:
I am trying to figure out how to sleep/wake the machine...
Here is some code that does not work.
...
NSCalendarDate *plus30Sec = [now dateByAddingYears:0 months:0
days:0 hours:0 minutes:0 seconds:30];
...
res = IOPMSchedulePowerEvent ((CFDateRef)plus30Sec,NULL,
CFSTR(kIOPMAutoSleep));
I see no indication in the documentation for NSCalendarDate that it is
toll-free bridged to CFDateRef. Have you tried passing to
IOPMSchedulePowerEvent() the type of date that the documentation
suggests?
Nicko
_______________________________________________
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.