Instance Property

modalWindow

The modal window displayed by the app.

Declaration

@property(readonly, strong) NSWindow *modalWindow;

Discussion

This property contains the current standalone modal window or nil if no modal window is being displayed. This property does not contain sheets that are attached to other windows. To retrieve a sheet, use the attachedSheet method of NSWindow.

See Also

Running a Modal Window

- runModalForWindow:

Starts a modal event loop for the specified window.

- stopModal

Stops a modal event loop.

- stopModalWithCode:

Stops a modal event loop, allowing you to return a custom result code.

- abortModal

Aborts the event loop started by runModalForWindow: or runModalSession:.

- beginModalSessionForWindow:

Sets up a modal session with the given window and returns a pointer to the NSModalSession structure representing the session.

- runModalSession:

Runs a given modal session, as defined in a previous invocation of beginModalSessionForWindow:.

NSModalResponse

A set of button return values for modal dialogs.

NSModalSession

Variables of type NSModalSession point to information used by the system between NSApplication’s beginModalSessionForWindow: and endModalSession: messages.

NSModalPanelRunLoopMode

A run loop should be set to this mode when waiting for input from a modal panel, such as NSSavePanel or NSOpenPanel.