On Mar 23, 2012, at 3:32 PM, Jan E. Schotsman wrote:

> I use KVO for this. Have your main thread observe the state variables 
> (declared as properties) and update the GUI in your 
> observeValueForKeyPath:ofObject:change:context: method.

That’s just going to call observeValue… on whatever thread the model state 
property changed on, not on the main thread. Which is exactly what the OP is 
asking how to avoid.

I don’t have an easy answer, other than implementing an observeValue… method 
that uses performSelector:onThread: to defer the real work to the main thread.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to