Adding controller keys to NSArrayController
Adding controller keys to NSArrayController
- Subject: Adding controller keys to NSArrayController
- From: Cocoa Guy <email@hidden>
- Date: Tue, 8 Mar 2005 12:25:03 -0800
I have a sub-class of NSArrayController (CellArrayController) that
introduces the notion of a selected cell, so in addition to
"selection", I'd like the controller to have "cellSelection".
I've implemented a "getCellSelection" on CellArrayController and this
returns an object that has one attribute "names". I've also
implemented a "setCellSelection".
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".
Finally I have a one column table and the column is bound to
NameArrayController, controller key: "arrangedObject", and nothing for
model key path.
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?
_______________________________________________
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