How does bind:toObject:withKeyPath:options: work?
How does bind:toObject:withKeyPath:options: work?
- Subject: How does bind:toObject:withKeyPath:options: work?
- From: "Hamish Allan" <email@hidden>
- Date: Thu, 17 Apr 2008 11:54:12 +0200
Hi,
I am attempting to work around a bug in NSArrayController by trying to
propagate change notifications for arrangedObjects manually, as if I
had bound the key path of another object to it (see
http://www.cocoabuilder.com/archive/message/cocoa/2008/4/17/204421 for
why that doesn't work).
However, by the time I receive the change notification for
arrangedObject, its value has already been updated, so it is too late
for me or any other part of the bindings system to send
willChangeValueForKey:. Therefore any observer of the downstream value
will also be told the same values for NSKeyValueObservingOptionOld and
NSKeyValueObservingOptionNew.
Is there any reason why the design of bindings requires, but does not
provide, notification that a value will change?
How does the default implementation of
bind:toObject:withKeyPath:options: work in the face of this?
Thanks,
Hamish
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden