title: Getting Selected value from NSTableView
body: <p><img src="https://i.stack.imgur.com/z1QlN.png" alt="Sample Application"></p>
  
  <p>I'm trying to build this application where the Column 'Package Name' is populated from Core data.  The second column has NSButtonCell added in IB and the idea is each time a checkbox is selected I need to get the name of the corresponding zip file in the 'Package Name' column.</p>
  
  <p>I tried something like this</p>
  
  <pre><code>- (void)tableViewSelectionDidChange:(NSNotification *)notification {
  
      NSTableView * tableView = [notification object];
      NSInteger rowIndex = [tableView selectedRow];
      NSTableColumn *column = [tableView tableColumnWithIdentifier:@"package-name"];
      NSCell *cell = [column dataCellForRow:rowIndex];
      NSLog(@"Found Value %@",cell.stringValue);    
  }
  </code></pre>
  
  <p>But the Value I get each time is different and inconsistent. For example if I select the 6ht checkbox (as shown in the screenshot), I expect to see 4.zip getting printed, but I get something else. How do I fix this ? </p>
  
  <p>Both my Package Name and Installation Status columns are sortable. </p>
  
  <p>Thanks</p>