Re: Confused about CFRunLoop
Re: Confused about CFRunLoop
- Subject: Re: Confused about CFRunLoop
- From: Eric Schlegel <email@hidden>
- Date: Mon, 17 Mar 2008 22:28:53 -0700
On Mar 17, 2008, at 7:53 PM, Brian Greenstone wrote:
[[NSApplication sharedApplication] run];
That actually works! My timer fires off like it should, yet
everything else works too. I can still access the menus, and window
still receive click events. Unfortunately, there's no way to exit
that event loop as far as I can tell. I tried this...
CFRunLoopStop(CFRunLoopGetCurrent());
... but that did nothing.
So, can someone explain the correct way to install a Timer, have the
system keep working like normal, and then be able to quit that event
loop from the timer's callback?
I think you want to replace QuitApplicationEventLoop with [NSApp
stop]. Then you can use either CFRunLoopTimer or NSTimer and
everything else will work properly.
-eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden