Instance Method

windowControllerWillLoadNib:

Sent before the specified window controller loads a nib file if the receiver is the nib file’s owner.

Declaration

- (void)windowControllerWillLoadNib:(NSWindowController *)windowController;

Parameters

windowController

The window controller that loads the nib file.

Discussion

See the class description for NSWindowController for additional information about nib files and the file’s owner object.

Typically an NSDocument subclass overrides windowNibName or makeWindowControllers, but not both. If windowNibName is overridden, the default implementation of makeWindowControllers will load the named nib file, making the NSDocument the nib file’s owner. In that case, you can override windowControllerWillLoadNib: and do custom processing before the nib file is loaded.

The default implementation of this method does nothing.

See Also

Creating and Managing Window Controllers

- makeWindowControllers

Subclasses may override this method to create the initial window controller(s) for the document.

windowNibName

The name of the document’s sole nib file.

- windowControllerDidLoadNib:

Sent after the specified window controller loads a nib file if the receiver is the nib file’s owner.

windowControllers

The document’s current window controllers.

- addWindowController:

Adds the specified window controller to this document’s list of attached window controllers and sets the document of the passed-in window controller.

- removeWindowController:

Removes the specified window controller from the receiver’s array of window controllers.

- shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:

Invokes shouldCloseSelector with the result of canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo: if the specified window controller that is closing is the last one or is marked as causing the document to close.