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, dangerwillrobinsondan...@gmail.com 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 (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:
> https://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.com&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0A&m=wiIBUDZXVD2hKTb8s%2FSqrN8y%2BGT%2F9xvGyxQqKN02Rl0%3D%0A&s=fa9bb34dae5116f40a8559ca004269945ea4578e20e1200c47cf4ace158b7e8b
> 
> This email sent to lruc...@vmware.com


_______________________________________________

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

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

Reply via email to