title: Swift error: Value of type 'NSObject - > () 'AnimalListTableViewController' has no member 'tableView'
body: <p>I'm trying to get rid of these errors in swift xcode</p>
  
  <p><a href="https://i.stack.imgur.com/47CSl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/47CSl.jpg" alt="Value of type &#39;NSObject -&gt; () -&gt; AnimalListTableViewController&#39; has no member &#39;tableView&#39; / Consecutive declarations on a line must be separated by &#39;;&#39; / Variable used within its own initial value"></a></p>
  
  <p>If screenshot is too small, here is the code</p>
  
  <pre><code>import UIKit
  
  class AnimalListTableViewController: UITableViewController
  {
      override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return 4
      }
      let indexPath = self.tableView.indexPathForSelectedRow()//this is where the error appears, it says  Value of type 'NSObject -&gt; () -&gt; AnimalListTableViewController' has no member 'tableView'
      override func prepareForSegue(segue: UIStoryboardSegue,
          sender: AnyObject?)
      {
              if let DetailViewController =
                  segue.destinationViewController
                      as? DetailViewController {
              }
      }
  
      if let indexPath = self.tableView.indexPathForSelectedRow()
      {
          DetailViewController.Animal = animals[indexPath.row]
      }
  }
  </code></pre>