Instance Property

window

The window owned by the receiver.

Declaration

@property(strong) NSWindow *window;

Discussion

Accessing this property loads the nib file if there is one and it has not yet been loaded. If the window was loaded, the following methods are called in order: windowWillLoad, loadWindow, and windowDidLoad. If the window controller has a document, the document's corresponding methods windowControllerWillLoadNib: and windowControllerDidLoadNib: are also called (if implemented). To affect nib loading or do something before or after it happens, you should always override these methods.

Setting this property releases the window controller’s old window along with any associated top-level objects in its nib file, and establishes ownership of the specified new window. Typically, you should not use this property to set the window. Instead, create a new window controller for the new window and then release the old window controller.

See Also

Loading and Displaying the Window

- loadWindow

Loads the receiver’s window from the nib file.

- showWindow:

Displays the window associated with the receiver.

windowLoaded

A Boolean value that indicates whether the nib file containing the receiver’s window has been loaded.

- windowDidLoad

Sent after the window owned by the receiver has been loaded.

- windowWillLoad

Sent before the window owned by the receiver is loaded.