Instance Method

documentForWindow:

Returns the document object whose window controller owns a specified window.

Declaration

- (__kindof NSDocument *)documentForWindow:(NSWindow *)window;

Parameters

window

The window owned by the window controller.

Return Value

The document object whose window controller owns window. Returns nil if window is nil, if window has no window controller, or if the window controller does not have an association with an instance of NSDocument.

See Also

Managing Documents

documents

The document objects managed by the receiver.

- addDocument:

Adds the given document to the list of open documents.

currentDocument

The document object associated with the main window.

hasEditedDocuments

A Boolean value indicating whether the receiver has any documents with unsaved changes.

- removeDocument:

Removes the given document from the list of open documents.