Re: Cocoa bindings one- or bi-directional
Re: Cocoa bindings one- or bi-directional
- Subject: Re: Cocoa bindings one- or bi-directional
- From: Zdzislaw Losvik <email@hidden>
- Date: Fri, 27 May 2005 12:41:47 +0200
Apple's NSView subclasses override bind:toObject:withKeyPath:options:
with their own functionality.
I mean it is a pity that so much additional code has to be written. I
would expect to call bind... to connect two variables in my MC -V
model and that should be sufficient. I want a value in Controller
(Model) to be synchronized with value in View. Nothing more, nothing
less.
It seems to me that right now to do that I must override view's
bind... method just as illustrated in joystick's example. IMHO would
be much better if NSObject's bind... would create a bi-directional
link between variables where each of them would be observing another.
The only risk I can is that poor implementation of bindings in this
case would cause an infinitive loop of A=>B, B=>A, A=>B in KVC/KVO.
Zdzislaw Losvik
_______________________________________________
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