title: NSTableColumn size to fit contents
body: <p>I am developing in and against Mac OS X 10.6 (Snow Leopard). When I double-click between two of my NSTableView's column headers, the column on the left autosizes, like you would expect.</p>
  
  <p>I want to provide this in a context menu as well, but it seems there is no publicly accessible function to do this. I've Googled, and looked at the documentation for NSTableView, NSTableHeaderView, and NSTableColumn, but found nothing. I find it hard to believe they wouldn't expose something so useful when they obviously have the code written to do it.</p>
  
  <p>I saw the <code>-[NSTableColumn sizeToFit]</code> method, but that only takes the header's size into account. I would also settle for sending the double-click event to the NSTableHeaderView, but couldn't figure out how to do that, either.</p>
  
  <p><strong>Update</strong> - I realized it's important to mention I have an NSArrayController (subclass) providing the data to my table, so I don't have an <code>NSTableViewDataSource</code> on which I could call <code>-[tableView: objectValueForTableColumn: row:]</code>. That is the crux of the problem: each column is bound to a keypath of the array controller and that's how it gets its data, so it can't loop through its contents.</p>