title: Accessing functions in ViewController from different class?
body: <p>I have a method called Server in my OSX app that I'm making. I am trying to design a logging console using a NSTextField that gets updated by other classes. It's throwing a Fatal error: unexpectedly found nil while unwrapping ...</p>
  
  <pre><code>class Server: NSObject {
  var view: ViewController!
  
  func output() {
      var received = "hello"
      view.sendData(received) // Throws an error here.
  }
  </code></pre>
  
  <p>and in my ViewController looks pretty much,</p>
  
  <pre><code>class ViewController: NSViewController {
  @IBOutlet var consoleOut: NSTextView!
  func sendData() {
        consoleOut.insertText(received!)
     }
  }
  </code></pre>