title: Pre-selecting row in NSTableView not working
body: <p>I am using the code below in viewDidLoad() to try and pre-select a table row in a tableView object (tblProjectNumber).  No errors at compile or run time.</p>
  
  <p>Everything loads ok and I can select table rows by a mouse click without any problems once the view is loaded.  However, I cannot load the view with the required default row pre-selected.  I have tried the following code in viewDidLoad() (the last three lines refer).  The tableView does not show a selected row and does not scroll the row at index(100) when the data loads.</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      self.view.wantsLayer = true
      self.view.layer?.backgroundColor = NSColor.windowBackgroundColor().CGColor
      self.view.window?.title = "Project Detail Module"
      self.view.window?.titleVisibility
  
      // sort the list of project numbers so that they display correctly when the view is first loaded
      self.sortProjectNumberArray()
      self.loadProjectRowDataArray()
      self.sortPPRFilesForLatestDate()
  
      // pre-select table row to load on initial display of the tableView
      let index = NSIndexSet(index: 100)
      self.tblProjectNumber.scrollRowToVisible(100)
      self.tblProjectNumber.selectRowIndexes(index, byExtendingSelection: true)
  }
  </code></pre>
  
  <p>The answeres here:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/20989487/select-row-in-tableview-programmatically-by-other-method-beside-calling-their-in">Select row in tableView programmatically by other method beside calling their indexPath</a></li>
  <li><a href="https://stackoverflow.com/questions/2035061/select-tableview-row-programmatically?rq=1">Select tableview row programmatically</a></li>
  <li><a href="https://stackoverflow.com/questions/29007079/xcode-swift-programatically-select-tablecell">Xcode - Swift Programmatically select tablecell</a></li>
  </ul>
  
  <p>have helped but I haven't been able to solve the issue. Also the call to selectRowAtIndexPath used in the last link doesn't seem to be available in Swift so it doesn't work for me either.</p>