Re: Responder chain and cancelOperation:, how to forward on?
Re: Responder chain and cancelOperation:, how to forward on?
- Subject: Re: Responder chain and cancelOperation:, how to forward on?
- From: Felix Franz <email@hidden>
- Date: Wed, 01 Oct 2014 19:50:32 +0200
On 01.10.2014, at 19:39, Sean McBride <email@hidden> wrote:
> Hi all,
>
> I have a custom view which implements cancelOperation: (from NSResponder).
>Depending on the view's internal state it sometimes responds to the escape key
>(and sometimes doesn't). When it doesn't respond, I want to pass the message
>along the responder chain. But calling either [super cancelOperation:] or
>[[self nextResponder] cancelOperation:] both result in an 'object does not
>respond to selector' exception. I thought that's how one passed things along
>the responder chain... what should I be doing?
Calling NSResponder#tryToPerform:with: on the nextResponder should do the trick.
It checks if the next responder responds to an action, if not it invokes it on
its nextResponder etc.
Cheers,
Felix
_______________________________________________
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