When binding cells in my NSTableView of type NSPopUpButtonCell I got an error
[<NSTableColumn > valueForUndefinedKey:]: this class is not key value coding-compliant for the key value.
The reality is that I am simply after the contents of the NSPopUpButtonCell as a string
But i changed
NSString *name;
to
NSObject *name;
Which made my application LOAD but crash when trying to display the contents to a NSTableView that displays the NSPopUpButtonCell column
ERROR: unrecognized selector sent to instance
When I have an UNBOUND cell, i am not getting an error, further if the cell is type NSTextFieldCell i do not have a problem and can use the NSString class instead.
I am guessing that this is about connecting the right bits to everything, from what I can see on the error, So, how do i have the popup cell to display the popup button but save the value of the selected sell in the actual array?
Thanks
//------------------------------------------------
//my.h
//------------------------------------------------
@interface theItemsInArrayC : NSObject {
@private
NSString *name;
int age;
}
@property int age;
@property (copy) NSString *name;
@end
@interface mybigList : NSObject {
@private
NSMutableArray *theItems;
}
@property (copy) NSMutableArray *theItems;
@end
//------------------------------------------------
AND
//------------------------------------------------
//my.m
//------------------------------------------------
@implementation theItemsInArrayC
@synthesize name;
@synthesize age;
- (id)init
{
self = [super init];
if (self) {
age = 19;
name = @"Another Name";
}
return self;
}
@end
@implementation mybigList
@synthesize theItems;
- (id)init
{
self = [super init];
if (self) {
theItems = [[NSMutableArray alloc] init];
}
return self;
}
@end
//------------------------------------------------