Hi,
I've a table view to which I add columns dynamically. It must be done this way because I can't predict how many or which columns I will need.
Some columns are checkboxes but I can't click on them when I run my application. The column and checkbox are set to be editable but if I click on the checkbox the check won't get set. Am I missing something?
Update
How I'm (trying) setting the state on the checkbox:
- (void)tableView:(NSTableView *)theTableView
setObjectValue:(id)theObject
forTableColumn:(NSTableColumn *)theColumn
row:(int)rowIndex
{
if (theTableView == resultsTableView) {
if ([[theColumn identifier] isEqualToString:CHCheckBoxColumnIdentifier]) {
NSInteger state = [[theColumn dataCell] state];
if (state == NSOnState) {
[[theColumn dataCell] setState:NSOffState];
} else {
[[theColumn dataCell] setState:NSOnState];
}
/*
NSLog(@"%@", theObject);
NSLog(@"%@", theColumn);
NSLog(@"%i", rowIndex);
*/
}
}
}