Causes the application to send the action message of a specified menu item to its target.
- macOS 10.0+
The integer index of a menu item.
In macOS 10.6 and later the
perform no longer triggers menu validation. This is because validation is typically done during menu tracking or key equivalent matching, so the subsequent
perform validation was redundant. To trigger validation explicitly, use invoke the
In OS X v10.6
perform, when called, now triggers highlighting in the menu bar. It also sends out appropriate accessibility notifications indicating the item was selected.