• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How does bind:toObject:withKeyPath:options: work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How does bind:toObject:withKeyPath:options: work?
      • From: Pierre Molinaro <email@hidden>
  • Prev by Date: Re: Implicit animation duration
  • Next by Date: Re: Implicit animation duration
  • Previous by thread: Re: Implicit animation duration
  • Next by thread: Re: How does bind:toObject:withKeyPath:options: work?
  • Index(es):
    • Date
    • Thread