• 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: "Kyle Sluder" <email@hidden>
  • Date: Mon, 17 Mar 2008 22:59:37 -0400

On Mon, Mar 17, 2008 at 10:53 PM, Brian Greenstone <email@hidden> wrote:
> I'm trying to convert some old Carbon code over to Cocoa, and one of
>  the things I'm doing is converting my old run-loop timers.  I used to
>  use the following code:

Are you sure you want to be creating your own run loops?  Every Cocoa
thread has a default run loop which you can get with +[NSRunLoop
currentRunLoop], and the main thread's run loop is running by default
(technically, this is what happens when you call -[NSApplication run],
which NSApplicationMain() does for you).

If all you're trying to do is create a scheduled timer, use +[NSTimer
scheduledTimerWithTimeInterval:invocation:repeats:] or one of the
other NSTimer class methods.

--Kyle Sluder
_______________________________________________

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

References: 
 >Confused about CFRunLoop (From: Brian Greenstone <email@hidden>)

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