Re: addObserver:forKeyPath:options:context
Re: addObserver:forKeyPath:options:context
- Subject: Re: addObserver:forKeyPath:options:context
- From: Ondra Cada <email@hidden>
- Date: Mon, 17 Apr 2006 20:15:21 +0200
Eric,
perhaps Mmalc or other bindings guru would correct me, but...
On 17.4.2006, at 20:02, Eric Long wrote:
It seems kind of ridiculous to iterate the array and register
individually for each object.
... either you implement the change notification in the model
independent on bindings (which tends to be best in general case), or
you have to do exactly this.
I'm thinking there must be a better way to do this.
I fear not. In some projects I've used shortcuts like re-implementing
setValue:forKey:, sending a change notification for any change from
there (and perhaps in your particular project that might be the
solution you are after), but generally that would not do: overriding
setValue:forKey: can be pretty inefficient, and besides, there can be
lotta other ways to change the model object values in general.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden