Re: Updating all bindings manually
Re: Updating all bindings manually
- Subject: Re: Updating all bindings manually
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 4 Jun 2006 08:46:33 -0700
On Jun 4, 2006, at 5:21 AM, Moray Taylor wrote:
Is it possible to update all bindings manually?
I know you can do something like
[self willChangeValueForKey:@"key"];
[self didChangeValueForKey:@"key"];
But I'd have to do that for all my bindings (50+), and update the
list every time I added a binding.
What I'd like is either be able to ask the Nib (or controller, or
whatever) for a list of it's bindings and then iterate through them.
I'm sure I've seen this done, but I've googled and can't find any
sign of it, maybe I dreamt it.
It really sounds like you are trying to work around a bug in your
code. In particular, bindings should never get out of sync with the
underlying model objects unless the model objects have custom setters/
getters that don't implement the correct willChange/didChange behavior.
If it is a case of "key 'a' changes, 'b' needs to update", KVO has a
mechanism for configuring dependent keys.
So, question, why do you need to do this?
b.bum
_______________________________________________
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