Am I wrong to believe that self = [super initWithWindowNibName:name] is my nib-loading call?
-[NSWindowController loadWindow]
is the method that actually loads the nib. Not that you should ever call it directly; -[NSWindowController window]
is the one you should call instead, because the latter invokes -[NSWindowController windowWillLoad]
and -[NSWindowController windowDidLoad]
as well.
The documentation for NSWindowController
states:
Although a window controller can manage a programmatically created window, it usually manages a window in a nib file. The nib file can contain other top-level objects, including other windows, but the window controller’s responsibility is this primary window.
The upshot of this is that nothing in the nib will be loaded until the window in it is loaded.
This is a "gotcha" that used to get me a few times!