windowDidLoad not called (again)
<p>This is driving me nuts. I have a couple of windows in my app which I open via a menu. I now added a new window, but it's <code>windowDidLoad</code> is never called.</p>

<pre><code>fileprivate let paymentWindowController = PaymentWindowController(windowNibName:"PaymentWindow")
</code></pre>

<p>is the declaration in my <code>AppDelegate</code> where I issue a </p>

<pre><code>paymentWindowController.loadWindow()
</code></pre>

<p>in its <code>applicationDidFinishLaunching</code>.</p>

<p>When my menu is clicked it invokes</p>

<pre><code>@IBAction func showPayments(_ sender: Any) {
  paymentWindowController.window!.makeKeyAndOrderFront(self)
}
</code></pre>

<p>The <code>PaymentWindowController</code> is just the scaffold which is created via New File/Cocoa/NSWindowController:</p>

<pre><code>class PaymentWindowController: NSWindowController {
  override func windowDidLoad() {
    super.windowDidLoad()
    print("never been here")
  }
}
</code></pre>

<p>The XIB has only the single window also from the scaffold. (I just renamed the XIB from <code>PaymentWindowController.xib</code> to <code>PaymentWindow.xib</code> like I did that for the other windows too.)</p>

<p>All other windows were created the same way and work as expected. But this bastard won't work as it should.</p>

<p>I also have cleaned the project and even erased Derived Data.</p>