NSWindowController
already defines a window
property. You have effectively overridden the getter of that property by implementing your own -window
method. The setter, though, is still the inherited version.
So, assuming you have connected the window
outlet of the controller to the window in the NIB, the inherited setter is being called. That allows the inherited implementation of -showWindow:
to work to show the window. But your -window
method will return nil
because the inherited setter does not set your infoWindow
instance variable.
Get rid of your separate infoWindow
property and getter. Just use the inherited window
property and its accessors.