Re: Binding and multithreading
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