NSController/binding question?
NSController/binding question?
- Subject: NSController/binding question?
- From: Jonathan Wight <email@hidden>
- Date: Sat, 25 Oct 2003 15:15:12 -0500
I have an NSTableView that I'm programmatically adding NSTableColumns to.
I'm then trying to bind the "value" of the column to an NSArrayController -
just like I would in Interface Builder's binding tab of the column.
Here's a snippet of code for creating the column, adding it to the table,
and then bind the "value" to the NSArrayController.
NSTableColumn *theTableColumn = [[[NSTableColumn alloc]
initWithIdentifier:@"name"] autorelease];
/* code for setting up table cells would go here */
[outletTableView addTableColumn:theTableColumn];
[theTableColumn bind:@"value" toObject:outletArrayController
withKeyPath:@"arrangedObjects.name" options:NULL];
Unfortunately when I run this code it fails with this error message:
[<NSTableColumn 0x483f800> valueForUndefinedKey:]: this class is not key
value coding-compliant for the key value.
Now - if I construct the table with Interface Builder and make the binding
manually everything works fine.
I can also add code to view the exposed bindings of my NSTableColumn and
"value" is there (you can also tell from looking at the available bindings
in Interface Builder).
Anyone know what I'm doing wrong?
Jon.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.