i am using the following code to add cells to a NSTableView. But this is adding textboxcells. i would need to add CheckboxCells instead. Could somebody please tell me how i can do that?
thanks!
//add cells
for (NSManagedObject *a in sortedArray)
{
NSTableColumn *newcolumn = [[NSTableColumn alloc] initWithIdentifier:[NSString stringWithFormat:@"%@",[a valueForKey:@"Name"]]];
[[newcolumn headerCell] setStringValue:[NSString stringWithFormat:@"%@",[a valueForKey:@"Name"]]];
[newcolumn setWidth:50];
[table addTableColumn:newcolumn];
}
Check box is implemented as a button. You simply set the dataCell property of NSTableColumn to indicate the default dataCell.