• 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: Matt Long <email@hidden>
  • Date: Wed, 19 Mar 2008 19:53:30 -0600

Man! That sure simplified things. Thanks for the tip. Works perfectly. I ended up using NSRunLoopCommonModes which is apparently Leopard only. But that's fine for my app.

Thanks.

-Matt


On Mar 19, 2008, at 7:16 PM, Wim Lewis wrote:


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

_______________________________________________

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: 
 >Perform Selector After Delay Secondary Window (From: Matt Long <email@hidden>)
 >Re: Perform Selector After Delay Secondary Window (From: Wim Lewis <email@hidden>)

  • Prev by Date: Re: dataCellForTableColumn method
  • Next by Date: North Carolina Developers
  • Previous by thread: Re: Perform Selector After Delay Secondary Window
  • Next by thread: Trouble with CurrencyConverter tutorial
  • Index(es):
    • Date
    • Thread