FROM : Scott Anguish
DATE : Fri Jul 21 10:11:07 2006
in my original reply, when I said controller I meant specifically
NS*Controller
On Jul 20, 2006, at 9:57 PM, Matt Neuburg wrote:
> For example, I'm using bind: to cause my main app controller,
> MyObject, to
> have its "paths" ivar synced with a "paths" value supplied (thru
> manual KVO)
> by a matrix subclass, MyMatrix. Would you try to claim that this is
> wrong?
as much as I can tell here, yes.
The recommendation is that bindings should not be used between two
model objects. Binding views directly to model objects should only be
done (and even then it isn't something that is currently suggested)
when there is no updating of the values due to changes in the U
(essentially read-only).
> In short, I have come to see the warning against bind: as a kind of
> canard;
> it is a cute but purely theoretical grumble.
We've talked at length with engineering about it, and it isn't
something that we suggest doing.
> Isn't that exactly what
> bindings are for??? m.
>
bindings are intended to eliminate glue code between views and model
objects
KVO is the better solution. if the observeValeForKeyPath: method is
a bottleneck or results in ugly code it is quite possible to
encapsulate that observing code into an object...
DATE : Fri Jul 21 10:11:07 2006
in my original reply, when I said controller I meant specifically
NS*Controller
On Jul 20, 2006, at 9:57 PM, Matt Neuburg wrote:
> For example, I'm using bind: to cause my main app controller,
> MyObject, to
> have its "paths" ivar synced with a "paths" value supplied (thru
> manual KVO)
> by a matrix subclass, MyMatrix. Would you try to claim that this is
> wrong?
as much as I can tell here, yes.
The recommendation is that bindings should not be used between two
model objects. Binding views directly to model objects should only be
done (and even then it isn't something that is currently suggested)
when there is no updating of the values due to changes in the U
(essentially read-only).
> In short, I have come to see the warning against bind: as a kind of
> canard;
> it is a cute but purely theoretical grumble.
We've talked at length with engineering about it, and it isn't
something that we suggest doing.
> Isn't that exactly what
> bindings are for??? m.
>
bindings are intended to eliminate glue code between views and model
objects
KVO is the better solution. if the observeValeForKeyPath: method is
a bottleneck or results in ugly code it is quite possible to
encapsulate that observing code into an object...






Cocoa mail archive

