Re: Array controller content vs. contentArray binding
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