title: Odd behavior of rowForView and selectRowIndexes in NSOutlineView
body: <p>I have a source list view in my app that's set up to be view based. I then added a badge/button to my cells via this method;</p>
  
  <blockquote>
    <p>First subclass NSTableCellView, add an IBOutlet for an NSButton and a
    @synthesize/@property statement to it. Then open the NSTableCellView
    that should have a badge in Interface Builder. Set it's class to your
    newly created subclass and add a button to it. Set the button style to
    "inline" and it's type to "switch".</p>
    
    <p>Now select the NSTableCellView again and connect the NSButton IBOutlet
    to your added button. That's it. You can now call e.g. [[cellView
    button] setTitle@"123"]] to set the rows badge label to 123 or any
    arbitrary string.</p>
  </blockquote>
  
  <p>This worked great, but clicking the badge doesn't actually select that row, so I added a click handler to the button.</p>
  
  <pre><code>- (IBAction)sourceListBadgeClicked:(id)sender {
      NSUInteger selectedRow = [self.outlineView rowForView:sender];
      if (selectedRow == -1) {
          return;
      }
  
      NSLog(@"click row: %lu", selectedRow);
  
      NSIndexSet *indexSet = [NSIndexSet indexSetWithIndex:1];
      [self.outlineView selectRowIndexes:indexSet byExtendingSelection:NO];
  }
  </code></pre>
  
  <p>I can see the handler get called, but selectedRow is always returned as 0, and selectRowIndexes doesn't actually select the row (I hard-coded to 1 just to test).. Is there something I'm missing in how to do this?</p>