• 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 and cancelOperation:, how to forward on?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Responder chain and cancelOperation:, how to forward on? (From: Sean McBride <email@hidden>)

  • Prev by Date: Responder chain and cancelOperation:, how to forward on?
  • Next by Date: Re: Crash while resizing window
  • Previous by thread: Responder chain and cancelOperation:, how to forward on?
  • Next by thread: Re: Crash while resizing window
  • Index(es):
    • Date
    • Thread