Re: NSArrayController bound to an array of strings
Re: NSArrayController bound to an array of strings
- Subject: Re: NSArrayController bound to an array of strings
- From: Scott Anguish <email@hidden>
- Date: Mon, 17 Nov 2008 04:08:02 -0500
there are workarounds to do this, but the basic answer is that it
isn't intended to be used with a simple array of strings.
You can make a class that holds the simple string object, or perhaps
use an NSDictionary with a specific key.
On 16-Nov-08, at 12:45 PM, Meik Schuetz wrote:
Dear all,
If have seen lots of examples in which a NSTableView is bound to an
NSArrayController which is bound to an array of entity objects,
having various properties. However I am now trying to bind a table
column to an array of strings and I don't seem to get this working.
The string contents show up correctly, but when I try to modify an
existing item, or add a new item, I get the error
Error setting value for key path of object (from bound object
<NSTableColumn: 0x10bb40>(null)): [<NSCFString 0xa0609328>
setValue:forUndefinedKey:]: this class is not key value coding-
compliant for the key .
I got the NSArrayController bound to the NSMutableArray property of
my AppController class. I set the class to NSMutableString (also
tries NSString). The NSTableView is bound to the NSArrayController,
as well as the table column.
Do I really need to create a class which only contains a string
property to get this working, or is there any trick that I don't
know about.
_______________________________________________
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