Instance Method

tryToPerform:with:

Dispatches action messages with a given argument.

Declaration

- (BOOL)tryToPerform:(SEL)action with:(id)object;

Parameters

action

The selector to attempt to execute.

object

The message’s argument.

Return Value

YES when the window or its delegate perform action with object; otherwise, NO.

Discussion

The window tries to perform the method action using its inherited NSResponder method tryToPerform:with:. If the window doesn’t perform action, the delegate is given the opportunity to perform it using its inherited NSObject method performSelector:withObject:.

See Also

Handling Events

+ menuChanged:

This method does nothing; it is here for backward compatibility.

Deprecated
currentEvent

The event currently being processed by the application.

- nextEventMatchingMask:

Returns the next event matching a given mask.

- nextEventMatchingMask:untilDate:inMode:dequeue:

Forwards the message to the global NSApplication object, NSApp.

- discardEventsMatchingMask:beforeEvent:

Forwards the message to the NSApplication object, NSApp.

- postEvent:atStart:

Forwards the message to the global NSApplication object, NSApp.

- sendEvent:

This action method dispatches mouse and keyboard events sent to the window by the NSApplication object.