Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3952148
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:48:57+00:00 2026-05-20T01:48:57+00:00

I asked a question earlier on here regarding the use of First Responder –

  • 0

I asked a question earlier on here regarding the use of First Responder – and got a response here:

Trouble with First Responder

Would anyone mind giving me a ‘dummies’ version of this? Being new to Cocoa, I don’t really know where to start with either one of these methods. I award answers quickly

Zach

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:48:58+00:00Added an answer on May 20, 2026 at 1:48 am

    First Responder is specifically this.

    What you’re asking about, though, is target-action. You have a UI object (button, menu item) that you need to cause multiple things to happen, but the UI object only sends one action.

    Hence the solution: Make that action do multiple things.

    Hook the UI object up to an action method you implement in your controller object (in your case, the document). In that method, do all the things the button needs to cause.

    The subclassing solution is basically the same thing, except instead of hooking the UI object up to your document, you hook it up to the font manager, but you also make the font manager an instance of a subclass of NSFontManager that you create, rather than an instance of NSFontManager directly. In your subclass, you override addFontTrait: and add the other behavior in your implementation. At either the start or the end of that method, you send [super addFontTrait:sender] to invoke NSFontManager’s implementation, so the original implementation gets done.

    Long paragraph, but it’s not actually all that much more work: The difference is just making the subclass and making the instance an instance of that subclass.


    You’ve said before that “the Apple Documentation is incredibly vague”, but it’s really not. There just happens to be a lot of it, and maybe you haven’t been looking at the right 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.

    1. The Objective-C Programming Language
    2. The Memory Management Programming Guide for Cocoa
    3. The Cocoa Fundamentals Guide (which explains target-action, among other things)
    4. Application Architecture Overview
    5. Resource Programming Guide
    6. Interface Builder User Guide
    7. The Xcode 3 guides:
      1. Xcode Project Management Guide
      2. Xcode Workspace Guide
      3. Xcode Build System Guide
      4. Xcode Debugging Guide
    8. Document-Based Applications Overview

    There is also an Instruments User Guide, but, unfortunately, that one is vague—or, to be more precise, incomplete. It omits a lot of useful information, like how to use Instruments’ Zombies template to debug crashes. It’s a high-level overview, nothing more.

    Also, bookmark these:

    • Cocoa Core Competencies, a quick reference to all the concepts you need to use
    • The Foundation Framework Reference
    • The AppKit Framework Reference
    • The Core Foundation Framework Reference
    • The Core Graphics Framework Reference

    That’s a lot of reading, but it’ll tell you everything you need to know, and that order is roughly the order you’ll need to know it in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked a question on here earlier and got some fantastic responses. I've since
Earlier today I asked a question and got a good answer here . However
I asked a similar question earlier here , and it got me down the
I asked a question here earlier today and got that fixed, but now I
I asked a question earlier today here . However, what I neglected to check
Related to a question I asked earlier here , I've found a problem which
I asked this question earlier and I got very quick and helpful responses: Linq
I asked a question earlier about why left joins in Linq can't use defined
This is a follow up to a question I asked earlier seen here: Confused
I asked this goofy question earlier today and got good answers. I think what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.