The first responder is this.
What you are asking is target action. You have an interface object (button, menu item) in which you need to call several things, but the user interface object sends only one action.
Therefore, the solution: do this by doing a few things.
Connect the user interface object to the action method that you implement in the controller object (in your case, in the document). In this method, perform all the actions that the button should trigger.
The subclassical solution is basically the same, except that instead of connecting the user interface object to your document, you connect it to the font manager, but you also create the font manager an instance of the NSFontManager subclass that you create, not an instance NSFontManager directly. In your subclass, you override addFontTrait: and add other behavior to your implementation. At the beginning or end of this method, you send [super addFontTrait:sender] to invoke the NSFontManager implementation, so the original implementation is executed.
Itโs a long paragraph, but actually it doesnโt work that much: the difference is simply creating a subclass and instantiating this subclass.
You already said that the "Apple Documentation is incredibly vague," but it really is not. It just happens to be a lot, and perhaps you did not look at the necessary documents.
These are the documents you need to read, from start to finish and in order:
EDIT: This list is for Xcode 3. I posted an updated (for Xcode 4) version of this list in another answer .
There is also a User Guide for tools , but, unfortunately, it is uncertain or, to be more precise, incomplete. It does not contain much useful information, for example, how to use the Zombie template to debug crashes. This is a high-level review, nothing more.
Also add the following bookmarks:
This is a lot of reading, but it will tell you everything you need to know, and this order roughly corresponds to what you need to know.