• 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: Run Function At Intervals in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run Function At Intervals in Cocoa


  • Subject: Re: Run Function At Intervals in Cocoa
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 13 Oct 2008 16:19:05 -0500

On Oct 13, 2008, at 4:02 PM, Eric Lee wrote:

On Oct 13, 2008, at 10:47 AM, Pierce Freeman wrote:

Hi everyone. I am fairly new to Cocoa, so I apologize if this is a very
basic question (but after searching for awhile I still can't find an
answer). Anyway, I am wondering how I can create a function that will run
at intervals. What the function would do is scan which applications are
open, and then output a message to the user if there is a certain
application open (I have already created this part of it). If anyone could
help, that would be great.

Check out NSTimer, NSTimeInterval, and NSRunLoop

Even better, though, would be to use the techniques described in this Technical Note, which avoids the polling that you're trying to do: http://developer.apple.com/technotes/tn/tn2050.html


Cheers,
Ken

_______________________________________________

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: 
 >Run Function At Intervals in Cocoa (From: Pierce Freeman <email@hidden>)
 >Re: Run Function At Intervals in Cocoa (From: Eric Lee <email@hidden>)

  • Prev by Date: Re: Run Function At Intervals in Cocoa
  • Next by Date: Re: Remove help menu shortcut
  • Previous by thread: Re: Run Function At Intervals in Cocoa
  • Next by thread: NSBrowser, NSTreeController and Core Data
  • Index(es):
    • Date
    • Thread