• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: First Responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First Responder


  • Subject: Re: First Responder
  • From: koko <email@hidden>
  • Date: Sat, 26 Feb 2011 00:29:03 -0700

Good lesson.

At least I know I am not twisting things around the axel. (as in my earliest Cocoa dev attempts, sacre bleu!)

Thanks !

-koko


On Feb 26, 2011, at 12:25 AM, Kyle Sluder wrote:

> On Fri, Feb 25, 2011 at 11:19 PM, koko <email@hidden> wrote:
>> Penchant is a great word. Did you know that the average vocabulary is less that 200 words? And I be penchant is not in that set.
>>
>> I guess I should rethink my design although I got around things by getting a pointer the Menu Item and then setting its target to be my object.  I just thought this is a few steps too many
>>
>> 1. define an outlet - one line of code
>> 2. connect the outlet - one IB action
>> 3. set the target on the outlet - one more line of code
>>
>> Seems like a lot.  But if my action was in a view in the view hierarchy all is well with just an IB connection.
>
> Yes, this is the point of the responder chain. It is very much related
> to what views and windows are onscreen, and where the keyboard focus
> happens to be at the time.
>
> If you always want your message to go to the same object (by which I
> do _not_ mean "the same type of object in each window"), then it is
> appropriate to point the menu item's target property at your object.
> But if the object you want to message exists in one or more instance
> per window, you should use the responder chain. That might mean that
> your window controller might need to respond to the action message and
> forward it along to the object in question.
>
> --Kyle Sluder
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >First Responder (From: koko <email@hidden>)
 >Re: First Responder (From: Kyle Sluder <email@hidden>)
 >Re: First Responder (From: koko <email@hidden>)
 >Re: First Responder (From: Graham Cox <email@hidden>)
 >Re: First Responder (From: koko <email@hidden>)
 >Re: First Responder (From: Kyle Sluder <email@hidden>)
 >Re: First Responder (From: koko <email@hidden>)
 >Re: First Responder (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: NSWindowController
  • Next by Date: Re: NSWindowController
  • Previous by thread: Re: First Responder
  • Next by thread: Re: First Responder
  • Index(es):
    • Date
    • Thread