title: View-based NSOutlineView without NIB?
body: <p><code>NSOutlineView</code> is a subclass of <code>NSTableView</code>. And currently, <code>NSTableView</code> supports two implementations.</p>
  
  <ul>
  <li>Cell-based.</li>
  <li>View-based.</li>
  </ul>
  
  <p>To make OSX 10.8 Finder style side bar (<strong>with automatic gray Icon styling</strong>), need to use view-based table view with source-list highlight style.</p>
  
  <p>With NIBs, this is typical job. Nothing hard. (see <a href="https://developer.apple.com/library/mac/samplecode/SidebarDemo/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010893-Intro-DontLinkElementID_2" rel="noreferrer">SidebarDemo</a>) But I want to avoid any NIBs or Interface Builder. I want make the side bar purely programmatically.</p>
  
  <p>In this case, I have big problem. AFAIK, there's no way to supply prototype view for specific cell. When I open <code>.xib</code> file, I see <code>&lt;tableColumn&gt;</code> is containing <code>&lt;prototypeCellViews&gt;</code>. And this specifies what view will be used for the column. I can't find how to set this programmatically using public API.</p>
  
  <p>As a workaround, I tried to make cell manually using <code>-[NSTableView makeViewWithIdentifier:owner:]</code> and <code>-[NSTableView viewAtColumn:row:makeIfNecessary:]</code>, but none of them returns view instance. I created a <code>NSTableCellView</code>, but it doesn't have image-view and text-field instances. And I also tried to set them, but the fields are marked as <code>assign</code> so the instances deallocated immediately. I tried to keep it by forcing retaining them, but it doesn't work. <code>NSTableView</code> doesn't manage them, so I am sure that table view don't like my implementation.</p>
  
  <p>I believe there's a property to set this prototype-view for a column. But I can't find them. Where can I find the property and make system-default <code>NSOutlineView</code> with source-list style programmatically?</p>