• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Carbon Callbacks in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Carbon Callbacks in Cocoa
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: Re: Ridiculously Enormous PDFs and Printing
  • Next by Date: Re: Carbon Callbacks in Cocoa
  • Previous by thread: Re: NSAppleScript - "Tell Finder to Eject Disk 'Foo' " - strange Log messages
  • Next by thread: Re: Carbon Callbacks in Cocoa
  • Index(es):
    • Date
    • Thread