title: NSButton inside NSTableView Programmatically?
body: <p>How can I set a column of checkboxes inside a NSTableView? So far, this is what I have done, but it just puts the int 1 in the column, not the checkboxes:</p>
  
  <pre><code>-(id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row {
      if ([[tableColumn identifier] isEqualToString:@"Enable"]) {
          NSButtonCell *cell=[[[NSButtonCell alloc] init] autorelease];
          [cell setAllowsMixedState:YES];
          [cell setButtonType:NSSwitchButton];
          NSCell *aCell = [tableColumn dataCellForRow:row];
          [aCell setObjectValue:cell];
          return [NSNumber numberWithInt:1];
      }
  
      return [[data objectAtIndex:row+1] objectAtIndex:[[data objectAtIndex:0] indexOfObject:[tableColumn identifier]]];
  }
  </code></pre>