Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jsnuff1

macrumors 6502a
Original poster
Oct 4, 2003
730
340
NY
I have a NSTableview that is connected to a NSArrayController through bindings. There is a NSTextView where it simply takes the string values and adds it to the controller/tableview using the description model key path.

This works fine when adding objects the array, and when selecting an item in the tableview (which displays the object in the textview).

An issue arises when I try to modify the text in the textview, and then select another item in the Tableview. I guess what happens it the array controller is trying to save the modified string, but something is not connected correctly through bindings. Below is the message I get


Error setting value for key path selection.description of object <SavedArrayController: 0x100410bf0>[object class: NSMutableString, number of selected objects: 1] (from bound object <NSTextView: 0x10013ae70> with object ID 207 in nib named MainMenu.nib): [<NSCFString 0x1004063a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key description.


On a side note I also got this message when I tried adding objects to the Arraycontroller using the add: method, so I had to manually grab the string value from the textview and add it to the controller myself using addObject:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.