• 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: Inactivity Timer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inactivity Timer


  • Subject: Re: Inactivity Timer
  • From: Rob Keniger <email@hidden>
  • Date: Wed, 25 Nov 2009 09:32:32 +1000

On 25/11/2009, at 8:37 AM, Kevin wrote:

> I needed to implement an inactivity timer in my Cocoa App and did so my subclassing NSApplication and overriding sendEvent: to start and stop a timer. Although it works most of the time, every once in a while my timer gets fired as I'm typing text into a text field or interacting with some other control like scrolling a table view.


You might want to look at Uli Kusterer's UKIdleTimer, which is a Cocoa wrapper around the Carbon EventLoopIdleTimer, which is a system-provided timer that only fires when the machine has been idle for a specified amount of time:

http://www.zathras.de/angelweb/sourcecode.htm#UKIdleTimer

--
Rob Keniger



_______________________________________________

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: 
 >Inactivity Timer (From: Kevin <email@hidden>)

  • Prev by Date: Re: Inactivity Timer
  • Next by Date: int* array going astray
  • Previous by thread: Re: Inactivity Timer
  • Next by thread: Need some pointers for professional printing options
  • Index(es):
    • Date
    • Thread