• 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: NSArrayController Update Delay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController Update Delay


  • Subject: Re: NSArrayController Update Delay
  • From: William Squires <email@hidden>
  • Date: Fri, 14 Oct 2011 20:20:51 -0500

What about performSelector:withObject:afterDelay: with a delay of 0.0, I believe, will perform the selector after the current iteration of the run loop. Not sure about thread safety, though.

On Oct 13, 2011, at 10:17 PM, Steve Steinitz wrote:

> Hi Richard,
>
> The advice you've received already is more sound than what I'm about to tell you.  But my crude technique has solved the problem you mention and similar problems.
>
> I wrote the following class method on a utility class into which I throw stuff:
>
> + (void)
> waitUntilEndOfNextRunLoop
> {
> 	[[NSRunLoop mainRunLoop] runUntilDate:[NSDate distantPast]];  // finish current iteration
> 	[[NSRunLoop mainRunLoop] runUntilDate:[NSDate distantPast]];  // once more so selection updates
> }
>
> Whenever I have a problem like the one you mention, I invoke that method and all is well.  I confess, I invoke it right and left.  I has no effect on performance that I can notice.  But its far from pretty.
>
> Cheers,
>
> Steve
>
> _______________________________________________
>
> 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: 
 >Re: NSArrayController Update Delay (From: Steve Steinitz <email@hidden>)

  • Prev by Date: Re: Blocks vs. life, the universe and everything
  • Next by Date: Re: Blocks vs. life, the universe and everything
  • Previous by thread: Re: NSArrayController Update Delay
  • Next by thread: Pop-up menu in NSCollectionView
  • Index(es):
    • Date
    • Thread