Instance Method

removeWindowController(_:)

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

Declaration

func removeWindowController(_ windowController: NSWindowController)

Parameters

windowController

The window controller that is removed.

Discussion

A document with no window controllers is not necessarily closed. However, a window controller can be set to close its associated document when the window is closed or the window controller is deallocated.

The default implementation of this method sends a document message to the passed-in window controller with a nil argument. You would not typically override this method.

See Also

Creating and Managing Window Controllers

func makeWindowControllers()

Creates the window controller objects that the document uses to display its content.

func addWindowController(NSWindowController)

Adds the specified window controller to the current document.

var windowControllers: [NSWindowController]

The document’s current window controllers.

var windowNibName: NSNib.Name?

The name of the document’s sole nib file.

func windowControllerDidLoadNib(NSWindowController)

Called after one of the document's window controllers loads its nib file.

func windowControllerWillLoadNib(NSWindowController)

Called before one of the document's window controllers loads its nib file.