• 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: Responder Chain Confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Responder Chain Confusion


  • Subject: Re: Responder Chain Confusion
  • From: email@hidden
  • Date: Tue, 09 Sep 2014 11:24:16 +0900

Intriguing. I will check that out for the future.
I know there are at least a couple of chains.
I just wish I knew more about the ups and downs of creating new chains.
Without duplication and abuse, it's such a powerful pattern with Objective-C.

Sent from my iPhone

> On 2014/09/09, at 8:55, Lee Ann Rucker <email@hidden> wrote:
>
> If you’re targeting 10.7 or later, you can use supplementalTargetForAction:sender: to add a responder chain side branch without modifying the actual chain.
>
>
>> On Sep 7, 2014, at 9:24 AM, email@hidden wrote:
>>
>> Hi all
>>
>> I just spent a bit of time poking around the responder chain and nil targeted actions.
>> I built a view controller and a view hierarchy with controls that should be configurable.
>> When instantiating the view controller the interface allows configuring the action SEL of the controls. Reuse is the goal of course.
>> I know 10.10 changes things greatly for view controllers. But on 10.9 that's not there.
>>
>> Anyway, I need to insert the view controller into the responder chain between its top level view and that view's superview.
>> That wasn't too bad. Implement the missing reference to the vc in a view subclass and give the vc a callback when the view is in place.
>>
>> But what I found while tinkering is that for non-document based apps from a vanilla project template there was no next responder for the window or the NSApplication instance.
>> I had a method in the app delegate that I was trying to reach via nil targeted action. It couldn't get there.
>> So I set the window nextResponder to the app and the app to the app delegate. I also made the app delegate an NSResponder subclass.
>>
>> It feels like overkill.
>> Am I missing something simple?
>> Is there something better to do here?
>>
>>
>>
>> _______________________________________________
>>
>> 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
>

_______________________________________________

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: 
 >Responder Chain Confusion (From: email@hidden)
 >Re: Responder Chain Confusion (From: Lee Ann Rucker <email@hidden>)

  • Prev by Date: Re: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?
  • Next by Date: Re: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?
  • Previous by thread: Re: Responder Chain Confusion
  • Next by thread: Add bindings for custom menu items' isHidden to (an attribute of) a custom object?
  • Index(es):
    • Date
    • Thread