• 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: Array controller content vs. contentArray binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array controller content vs. contentArray binding


  • Subject: Re: Array controller content vs. contentArray binding
  • From: mmalc Crawford <email@hidden>
  • Date: Thu, 7 Jun 2007 23:21:05 -0700


On Jun 7, 2007, at 3:04 PM, Dave Hayden wrote:

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
and it all made sense. I added an "add" button to add entries to the combatants array instead of pre-populating the list, and it was simple and easy like bindings are supposed to be. (ha!) One thing, though: The targets list didn't update. After a bit of poking, I found that if I bind the array controllers' "contentArray" binding to the app controller's "combatants" key path instead of the "content" binding, it does work. Also, contrary to the comments in the source, it seems to be a simple matter to do the binding in IB.
Am I missing something here? Or is the example just out of date?


The example was originally written for Mac OS X v10.3 and I haven't really looked at it since.

In Mac OS X v10.4 it became possible to use Interface Builder to establish bindings to objects other than just File's Owner and subclasses of NSController, so the comments are out-of-date. The binding to 'content' was a bug that's gone unnoticed for a couple of years, although given that the array contents were read-only it's perhaps unsurprising.

I've now updated the example for 10.4 and corrected the bug.

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Array controller content vs. contentArray binding (From: Dave Hayden <email@hidden>)

  • Prev by Date: Re: Sorting filenames the way the Finder does?
  • Next by Date: Re: Sorting filenames the way the Finder does?
  • Previous by thread: Array controller content vs. contentArray binding
  • Next by thread: RE: Key number to Unicode string (email@hidden)
  • Index(es):
    • Date
    • Thread