• 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 access to its -timerFireMethod
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer access to its -timerFireMethod


  • Subject: Re: NSTimer access to its -timerFireMethod
  • From: Graham Cox <email@hidden>
  • Date: Wed, 14 Jul 2010 22:27:34 +1000

On 14/07/2010, at 10:06 PM, John Love wrote:

> I think I have found the problem, but I would like confirmation ... the calls are from the main Thread, immediately followed by the display of a sheet.  I am trying to intercept errors while the sheet shows.  And while the sheet shows, all access to -timerFireMethod is temporarily halted.


You need to schedule the timer to run in the run loop mode that is used for sheets and other modal processes. By default it does not, and will be suspended as long as the sheet or modal dialog is running.

see [NSRunLoop addTimer:forMode] and  the mode you need is NSModalPanelRunLoopMode. If you also want it to fire while menus and buttons are being tracked, also add it to NSEventTrackingRunLoopMode

--Graham


_______________________________________________

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: 
 >NSTimer access to its -timerFireMethod (From: John Love <email@hidden>)

  • Prev by Date: Re: Adding an image to a project
  • Next by Date: UIPinchGestureRecognizer and MPMovieController view
  • Previous by thread: NSTimer access to its -timerFireMethod
  • Next by thread: UIPinchGestureRecognizer and MPMovieController view
  • Index(es):
    • Date
    • Thread