Re: Adding bindings to a custom view - "simple" implementation
Re: Adding bindings to a custom view - "simple" implementation
- Subject: Re: Adding bindings to a custom view - "simple" implementation
- From: George Orthwein <email@hidden>
- Date: Tue, 18 Apr 2006 15:57:52 -0400
On Apr 17, 2006, at 3:13 PM, mmalcolm crawford wrote:
If you're not initiating updates, that's fine. To put it another
way, you can use the "short version" if you have a read-only widget.
mmalc
Interesting! That wasn't the answer I expected, actually, since I
hadn't seen any other examples do it that way. Perhaps it's because
you could just as well use KVO by itself to update the view. I'm
still working out in my head what Bindings add to the underlying KVO/
KVC and when it is appropriate to use each.
It's interesting that bind:toObject:withKeyPath:options: sort of
automatically sets up the KVO part if you use a binding name that is
identical to a KVC compliant accessor. I wonder why the KVC part
(changes sent back from the view in this case) isn't set up
automatically as well, so that all you'd need is the one
bind:toObject:withKeyPath:options: for the simple case of keeping two
ivars in sync. I suspect it has to do with the underlying technology
that is way over my head. :) The "long version" is looking better,
though, now that it is finally starting to make sense to me.
Anyway, thanks very much for the replies!
George
_______________________________________________
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