title: Show list of strings in Source List (NSOutlineView) in Swift
body: <p>I'm trying to show a simple list of strings in a source list sidebar - similar to that in Finder or the Github app. From reading the <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSOutlineViewDataSource_Protocol/" rel="nofollow">protocol reference</a> I can't see which method is setting what the view displays. So far I have:</p>
  
  <pre><code>var items: [String] = ["Item 1", "Item 2", "Item is an item", "Thing"]
  func outlineView(outlineView: NSOutlineView, child index: Int, ofItem item: AnyObject?) -&gt; AnyObject {
      return items[index]
  }
  
  func outlineView(outlineView: NSOutlineView, isItemExpandable item: AnyObject) -&gt; Bool {
      return false
  }
  func outlineView(outlineView: NSOutlineView, numberOfChildrenOfItem item: AnyObject?) -&gt; Int {
      if item == nil {
          return items.count
      }
      return 0
  }
  func outlineView(outlineView: NSOutlineView, objectValueForTableColumn tableColumn: NSTableColumn?, byItem item: AnyObject?) -&gt; AnyObject? {
      return "ITEM"
  }
  func outlineView(outlineView: NSOutlineView, setObjectValue object: AnyObject?, forTableColumn tableColumn: NSTableColumn?, byItem item: AnyObject?) {
      println(object, tableColumn, item)
  }
  // Delegate
  func outlineView(outlineView: NSOutlineView, dataCellForTableColumn tableColumn: NSTableColumn?, tem item: AnyObject) -&gt; NSCell? {
      println("Called")
      let view = NSCell()
      view.stringValue = item as String
      return view
  }
  </code></pre>
  
  <p>And all I get is a source list with four blank items (No text). Do I need to override another method from the NSOutlineViewDelegate to show the information?</p>