(self asking and self-answering because I spent hours on the web looking for this, and most of the resources all say \"I solved it in the end\" without giving an explanation
Thank you for this solution, it pointed me in the right direction. For those of you learning InterfaceBuilder I hope this additional information helps.
It turns out while building a tutorial I had inadvertently Bound a Text field Cell - Text Cell
to my ArrayController.ObjectValue
.
The real binding was supposed to happen at
Table Column > Table Cell View > Static Text - Table View Cell
That one was correct, but visually in the tree below it (for reasons I don't understand yet IB needs a Text Field Cell
.) I had also bound:
Table Column > Text Field Cell - Text Cell
It was that second binding which trying to copy the whole object because the path was objectValue
with no key, it was triggering this error.
Probably a newbie mistake, but it meant walking through EVERY object and checking for bindings and I came across this one.
I got this when I returned a view from the NSTableViewDataSource
function -tableView:objectValueForTableColumn:row:
. Instead, it is supposed to return a value (e.g. NSString*
). (Not surprising given its name, but the error is not helpful in discovering this. The function I was thinking of is -tableView:viewForTableColumn:row:
in NSTableViewDelegate
.)