tryToPerform(_:with:)
Dispatches action messages with a given argument.
Declaration
func tryToPerform(_ action: Selector, with object: Any?) -> BoolParameters
- action:
The selector to attempt to execute.
- object:
The message’s argument.
Return Value
true when the window or its delegate perform action with object; otherwise, false.
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 perform(_:with:).