• 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
Re: bindings via file's owner don't update
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bindings via file's owner don't update


  • Subject: Re: bindings via file's owner don't update
  • From: James Bucanek <email@hidden>
  • Date: Mon, 29 Nov 2010 08:46:54 -0700

James Bucanek <mailto:email@hidden> wrote (Monday, November 29, 2010 8:37 AM -0700):

Basically, if I add an observer using the path "document.someProperty", KVO
attaches the observer to the the someProperty object, not document. So if I
change it (document.someProperty = newProperty), newProperty replaces the
original object, which is then released. newProprety doesn't have any
observers and doesn't post any notifications when its properties change.

Boy, I totally hosed that description.

What I meant to say is, if you're observing a property of a property (controller.document.prop) the observer for the property is attached to document object, not the controller object. So if you replace the document object in the controller (controller.document = newDocument), the binding in the old document gets lost and changes to the new document.prop won't be observed.

--
James Bucanek

_______________________________________________

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


References: 
 >Re: bindings via file's owner don't update (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: bindings via file's owner don't update
  • Next by Date: Re: bindings via file's owner don't update
  • Previous by thread: Re: bindings via file's owner don't update
  • Next by thread: Re: bindings via file's owner don't update
  • Index(es):
    • Date
    • Thread