Re: Adding controller keys to NSArrayController
Re: Adding controller keys to NSArrayController
- Subject: Re: Adding controller keys to NSArrayController
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 8 Mar 2005 15:23:13 -0800
On Mar 8, 2005, at 12:25 PM, Cocoa Guy wrote:
I have another array controller (NameArrayController) that in IB has
it's "contentArray" bound to CellArrayController, controller
key:"cellSelection" model key path: "names". It's "Object Class Name"
under Attributes is "NSString".
Array controllers typically don't play well with simple objects (such
as numbers and strings) -- you should use KVC-compliant objects such
as dictionaries.
My expectation is that when "setCellSelection" is called that the
binding using kvo would automatically update the table by calling
getCellSelection on CellArrayController and then calling getNames on
the returned object. The net effect should be that the the one column
table gets updated with the names. But the behavior I'm seeing is that
getCellSelection is called once during nib loading time, but after
that any calls to setCellSelection don't update the table.
Any idea what I'm doing wrong?
Sorry, I couldn't follow exactly what was happening here. For an
example, though, of a custom array controller with a key bound to
another array controller, see the "Combatants" example at <http://
homepage.mac.com/mmalc/CocoaExamples/controllers.html>.
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden