title: How to get an int out of selectedRowIndexs in Swift?
body: <p>I haven't worked in <code>Xcode</code>, <code>Objective C</code> or <code>Cocoa</code> before, and I decided to give <code>Swift</code> a try.
  The simple app I'm building (for Mac OS, not iOS) displays in a table view some data stored in an array.</p>
  
  <p>I'm trying to let the user delete a selected row, the only problem is I can't get an <code>index</code> in the form of a simple int from <code>myTableView.selectedRowIndexes</code>, this piece of code returns me an <code>NSIndexSet</code> object, and I don't know how to deal with it.</p>
  
  <p>Since I want the user to be able to select only one row at a time I think <code>firstIndex</code> is what I need to use, <a href="https://developer.apple.com/library/prerelease/iOS/documentation/Cocoa/Reference/Foundation/Classes/NSIndexSet_Class/index.html#//apple_ref/occ/instm/NSIndexSet/isEqualToIndexSet:" rel="nofollow noreferrer">Apple documentation</a> says: <code>var firstIndex: Int { get }</code> but I really lack the knowledge to understand how to use it.</p>
  
  <p>I'm sorry for the very basic question.
  Any help will be very appreciated!</p>