FROM : Rob Redpath
DATE : Tue Feb 05 22:45:11 2008
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
DATE : Tue Feb 05 22:45:11 2008
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
| Related mails | Author | Date |
|---|---|---|
| Rob Redpath | Feb 5, 22:45 | |
| William Turner | Feb 5, 23:46 | |
| Benjamin Stiglitz | Feb 6, 19:18 |






Cocoa mail archive

