NSArrayController & NSTableView selectionIndexes bug
NSArrayController & NSTableView selectionIndexes bug
- Subject: NSArrayController & NSTableView selectionIndexes bug
- From: Rob Redpath <email@hidden>
- Date: Tue, 05 Feb 2008 21:45:11 +0000
Hi,
I'm writing an app that has a table containing data on one side of a
split view, with its columns bound to an NSArrayController, and an
NSView subclass on the other side. It's not a document-based app so I
have an AppController class instantiated in IB with two outlets - one
for the the NSView subclass, the other for the arrayController. I can
add and delete rows from the table just fine, and display the info from
the current selection in the custom view, all ok.
The problem I'm having is that whenever I create two or more rows in the
table and switch between them the following appears in the debug console:
2008-02-05 21:20:29.770 GanttXv4[22988:10b] Error setting value for key
path selectionIndexes of object <NSArrayController: 0x134dd0>[object
class: NSMutableDictionary, number of selected objects: 1] (from bound
object <NSTableView: 0x129a30> with object ID 432 in Nib named
MainMenu.nib): [<NSCFString 0x191950> valueForUndefinedKey:]: this class
is not key value coding-compliant for the key selection.
At first I thought this was related to the fact that I've bound
arrayController.arrangedObjects to an NSMutableArray in the custom view,
as I want it to display the data for the whole table, not just the
current selection, but I've rolled my code back to before that happened
and it persists. It doesn't seem to affect the program's execution but I
don't want to run into problems later.
So my questions are:
- Any idea what causes that problem?
- Am I going about the overall problem the right way?
Thanks
Rob
_______________________________________________
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