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 <k...@highrolls.net> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to