• 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: ARC and NSObjectController bindings through file's owner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC and NSObjectController bindings through file's owner


  • Subject: Re: ARC and NSObjectController bindings through file's owner
  • From: Jerry Krinock <email@hidden>
  • Date: Thu, 31 Jul 2014 09:26:27 -0700

On 2014 Jul 31, at 09:05, Sean McBride <email@hidden> wrote:

> One thing I just noticed is that NSWindowController's 'document' property is not actually documented as KVO-compliant.  Maybe that's my problem... but I've been binding through it for over a decade now!

That may well be the real problem, Sean.

On 2014 Jul 30, at 13:33, Sean McBride <email@hidden> wrote:

> - the NSObjectController binds its 'managedObjectContext' binding to:
>   File's Owner.windowController.document.managedObjectContext

In a similar situation, I solved the “bindings burp” (what I call that nasty message you copied from the console) by inserting *another* object controller into the bindings “path”, to control the *document*.

One of the dangers of Cocoa Bindings is that it is very easy to bind long key paths like

   File’s Owner.windowController.document.managedObjectContext.foo.bar.whatever

that work fine in your "proof of concept" but burp or crash when torn down in some edge cases.  I’ve found liberal usage of object controllers to be the answer.


_______________________________________________

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: 
 >ARC and NSObjectController bindings through file's owner (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: ARC and NSObjectController bindings through file's owner
  • Next by Date: Re: ARC and NSObjectController bindings through file's owner
  • Previous by thread: Re: ARC and NSObjectController bindings through file's owner
  • Next by thread: 10.5 Load Fonts for use in webview
  • Index(es):
    • Date
    • Thread