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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to