I say Cocoa, you say Carbon
You know, I'm honestly starting at what point someone wanting to just do Cocoa/Java code is going to be able to not touch Carbon whatsoever. Admittedly there are some things like Quicktime that are going to take a lot of work to get there, and may never get there due to it's massive Carbon legacy... but this is just too damn frustrating.
At the moment I'm trying to get the screen/computer not to sleep while I'm doing a bit of Obj-C code. The only thing I've been able to find has been UpdateSystemActivity, which is only available through Carbon. Grr! Arg! This OS feels too damn schizophrenic sometimes. Almost everything related to power management doesn't seem to be available to Cocoa code.
At any rate, the below code seems to work fine:
OSErr UpdateSystemActivity (
UInt8 activity
);
I'm just annoyed that I'm having to use it.

Posted by drunkenbatman






Let me check with some of the guys at work. I know that for our client we some keep-alive stuff. Admittedly, it's all in Carbon, not Cocoa, but I know one of the developers is working on a Cocoa port (unofficial).