• 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: nstimer not firing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nstimer not firing?


  • Subject: Re: nstimer not firing?
  • From: Uli Kusterer <email@hidden>
  • Date: Sat, 10 Sep 2005 14:56:37 +0200


Am 07.09.2005 um 00:20 schrieb Luc Vandal:

I have a timer that I set in awakeFromNib but it's never firing:

Have you made sure you're running an event loop? NSTimers are attached to a run loop ("scheduled") and you can't expect any timers to fire unless you return control to a run loop (NSApplicationMain() sets up a run loop automatically and calls your menu item actions etc. from there).


If you are running your own run loop (e.g. in a modal dialog panel), you must make sure the timer has been scheduled to run in the proper run loop mode. There are different modes for "normal", "modal" and "tracking the mouse", for instance, and by default timers are only scheduled to run in the first mode.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >nstimer not firing? (From: Luc Vandal <email@hidden>)

  • Prev by Date: How To Design A Queue of Messages?
  • Next by Date: Re: How To Design A Queue of Messages?
  • Previous by thread: RE: nstimer not firing?
  • Next by thread: Binding table selection to outlineview
  • Index(es):
    • Date
    • Thread