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.

yummy alcohol posted button Posted by drunkenbatman
    November 23, 2003, at 09:06 PM


Comments (1)




Post a comment



Anonymous comments are allowed, but please enter something for a name.

And do endeavor to appear sane.









Remember personal info?