• 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
Re: Confused about CFRunLoop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Confused about CFRunLoop
      • From: Brian Greenstone <email@hidden>
References: 
 >Confused about CFRunLoop (From: Brian Greenstone <email@hidden>)

  • Prev by Date: Re: Confused about CFRunLoop
  • Next by Date: Re: interface builder 3 question
  • Previous by thread: Re: Confused about CFRunLoop
  • Next by thread: Re: Confused about CFRunLoop
  • Index(es):
    • Date
    • Thread