• 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: Binding and multithreading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding and multithreading


  • Subject: Re: Binding and multithreading
  • From: "Jan E. Schotsman" <email@hidden>
  • Date: Sat, 24 Mar 2012 19:19:49 +0100


On Mar 24, 2012, at 10:46 AM, Jonathan Taylor wrote:

It sounds, though, as if it should be ok to use observeValueForKeyPath:ofObject:change:context (which will run on the secondary thread, by the sound of it) as a way of monitoring the fact that "something" has changed in the state of my object. I can then use that as a single place in which I schedule a GUI update via a shadow object on the main thread. Does that sound as if it would be ok?

The Cocoa Design Patterns chapter of the Cocoa Fundamentals Guide (which I didn't read well enough) has a general solution (a receptionist object). If you just want to call a method of the observing object on the main thread then performSelectorOnMainThread may be all you need.

Jan E.
_______________________________________________

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: 
 >Binding and multithreading (From: "Jan E. Schotsman" <email@hidden>)
 >Re: Binding and multithreading (From: Dave Fernandes <email@hidden>)
 >Re: Binding and multithreading (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re: Binding and multithreading
  • Next by Date: Re: ARC not ready for primetime?
  • Previous by thread: Re: Binding and multithreading
  • Next by thread: can't get NSTextFinder to show the find panel
  • Index(es):
    • Date
    • Thread