Re: Apple Events and CFRunLoop?
Re: Apple Events and CFRunLoop?
- Subject: Re: Apple Events and CFRunLoop?
- From: Brian Webster <email@hidden>
- Date: Fri, 5 Apr 2002 10:45:32 -0600
On Friday, April 5, 2002, at 10:27 AM, Jonathan Feinberg wrote:
On Friday, April 5, 2002, at 09:04 AM, cocoa-dev-
email@hidden wrote:
But how can AppleEvents be made to fire in a vanilla CFRunLoop
application? Is it possible? I have searched the headers for
a way to create a RunLoopSource from an AppleEvent, but no dice.
You might try calling RunApplicatonEventLoop() instead
CFRunLoopRun(). I believe it uses CFRunLoop as the actual loop
but installs standard Carbon/Apple event handlers before running
it. I think you might not even have to install your own quit
event handler, although you certainly can if you want to do some
cleanup before quitting.
Does this not mean that I have to completely convert my
application to a Carbon model?
Well, there's not really anything to convert, since you have no
interface and don't handle any events. I just tried modifying
the source code you posted, and it seems to work fine. The only
thing you have to do is modify your Makefile to link to the
Carbon framework, which is necessary in any case if you want to
handle Apple events.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.