• 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: Perform Selector After Delay Secondary Window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perform Selector After Delay Secondary Window


  • Subject: Re: Perform Selector After Delay Secondary Window
  • From: Wim Lewis <email@hidden>
  • Date: Wed, 19 Mar 2008 18:16:49 -0700


On Mar 19, 2008, at 6:00 PM, Matt Long wrote:
[self performSelector:@selector(checkPlayback:) withObject:currentTimeValue afterDelay:0.15]

While the secondary window is open, checkPlayback never gets called. As soon as the window gets closed, though, all of these events pile up at my break point in checkPlayback. Of course, at that point, it is too late. The time when I needed it to fire has passed.

-performSelector:afterDelay: works via the run loop (perhaps using an NSTimer, I forget). Any run loop source (such as a timer waiting to fire) works in some set of run loop modes. AppKit defines a handful of modes that it uses, including the normal everyday run loop mode, one that's used during modal dialogs, one during mouse-tracking loops, etc.


Anyway, check the documentation of NSRunLoop / CFRunLoop for run loop modes, and of the -performSelector:withObject:afterDelay:inModes: method.


_______________________________________________

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


  • Follow-Ups:
    • Re: Perform Selector After Delay Secondary Window
      • From: Matt Long <email@hidden>
References: 
 >Perform Selector After Delay Secondary Window (From: Matt Long <email@hidden>)

  • Prev by Date: Perform Selector After Delay Secondary Window
  • Next by Date: Re: Correct use of NSViewController
  • Previous by thread: Perform Selector After Delay Secondary Window
  • Next by thread: Re: Perform Selector After Delay Secondary Window
  • Index(es):
    • Date
    • Thread