Swift: Build succeeds, a blank app window and this message appear: Failed to set (contentViewController) user defined inspected property on (NSWindow)
<p>I tried to create a simple Complex Number Calculator using classes. My application has compiled successfully, but when I ran it, a blank window appeared instead of a window with all my buttons, labels etc. and I got this message in the output window:</p>

<blockquote>
  <p>2016-03-08 22:20:42.499 Complex Numbers[30404:2328250] Failed to set
  (contentViewController) user defined inspected property on (NSWindow):
  Cannot create BOOL from object &lt;_NSControllerObjectProxy:
  0x6000000022c0> of class _NSControllerObjectProxy</p>
</blockquote>

<p>This is my ViewController class code. It involves a complexNumber class, which I didn't submit here:</p>

<pre><code>class ViewController: NSViewController {

    @IBOutlet var Screen: NSView!
    var a = complexNumber();

    @IBOutlet var realValue: NSTextField!

    @IBOutlet var imaginaryValue: NSTextField!

    @IBOutlet var resultLabel: NSTextField!

    @IBAction func lengthResult(sender: AnyObject) {

        let r = NSString(string: realValue.stringValue).doubleValue;
        let i = NSString(string: imaginaryValue.stringValue).doubleValue;

        a = complexNumber(real: r, imaginary: i);
        resultLabel.stringValue = String(a.trigonometric());
    }

    @IBAction func trigonometryResult(sender: AnyObject) {
        let r = NSString(string: realValue.stringValue).doubleValue;
        let i = NSString(string: imaginaryValue.stringValue).doubleValue;

        a = complexNumber(real: r, imaginary: i);
        resultLabel.stringValue = String(a.length());  
    }

    @IBAction func operation(sender: AnyObject) {
        a = complexNumber(real: NSString(string: realValue.stringValue).doubleValue, imaginary: NSString(string: imaginaryValue.stringValue).doubleValue);
        realValue.stringValue = ""
        imaginaryValue.stringValue = "";

        let b = complexNumber(real: NSString(string: realValue.stringValue).doubleValue, imaginary: NSString(string: imaginaryValue.stringValue).doubleValue)

        switch sender.stringValue {
            case "+": a = a.sum(b)
            case "-": a = a.dif(b)
            case "x": a = a.mul(b)
            case ":": a = a.div(b)
            default: a = a.sum(complexNumber())
        }
    }

    @IBAction func displayResult(sender: AnyObject) {
        resultLabel.stringValue = String("\(a.real) + i*\(a.imaginary)");
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override var representedObject: AnyObject? {
        didSet {
        // Update the view, if already loaded.
        }
    }   
}
</code></pre>

<p>I found a similar thread here, but I don't think it's what I was looking for.</p>

<p>Can you help me, please?</p>