Carbon Callbacks in Cocoa
Carbon Callbacks in Cocoa
- Subject: Carbon Callbacks in Cocoa
- From: Karl Goiser <email@hidden>
- Date: Fri, 18 Jul 2003 23:06:10 +1000
G'Day!
(Stop me if you have any better ideas...)
I want to find out when the screen saver starts and stops.
One way I can see is to poll the list of processes.
Another is using NSWorkspace's notifications. However, they don't work
for the screen saver.
So I find this tech note:
http://developer.apple.com/technotes/tn/tn2050.html. It's all about
this sort of thing. Even includes code and a note talking about how
some apps don't notify NSWorkspaces. Sounds good. So I plug the
Carbon code into my app. The 'note says it will work. Nothing
happens. Well, I don't know much about Carbon. I look at the code and
it has a RunApplicationEventLoop() call so I try that just to see what
happens. Works!
The Carbon code uses callbacks.
Now the question: how do I get the Carbon callbacks to work in Cocoa?
Thanks in advance everybody!
Karl
_______________________________________________
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.