Menus act like all standard control items. They have an action which is the function to be called and a target which is the object to send the function to. If the target is set to an object then when a user selects a menu item it the action method will be sent to the target object. If the menu item has an action, but not a target then the target will be dynamically selected from the first object from the following that responds to the action:
NSApplication
NSApplication.delegate
NSApplication.nextResponder
Implementing the default Open (⌘O) menu item can be accomplished by implementing the openDocument
method on any object in the above list.
- (IBAction)openDocument:(id)sender { }