• 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: Abusing targetForAction: with non-action selectors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abusing targetForAction: with non-action selectors


  • Subject: Re: Abusing targetForAction: with non-action selectors
  • From: Dave Dribin <email@hidden>
  • Date: Mon, 15 Sep 2008 18:51:09 -0500

On Sep 15, 2008, at 6:35 PM, Graham Cox wrote:
What exactly are you trying to do?

I'd say it's not safe, since that usage isn't anticipated, or necessary. If you could perhaps outline why you think you need it a better solution can be suggested.

I've got, say, an info panel that needs to display different stuff based on some object in the responder chain. What I really want to do is search the responder chain for an object that conforms to a specific protocol. I was just picking a method in the protocol as the argument to targetForAction:. I think the "safe" way is to put a dummy "marker" action on the protocol and then search the responder chain for that action. Then, check the target to make sure it actually conforms to the protocol.


-Dave

_______________________________________________

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


  • Follow-Ups:
    • Re: Abusing targetForAction: with non-action selectors
      • From: Graham Cox <email@hidden>
References: 
 >Abusing targetForAction: with non-action selectors (From: Dave Dribin <email@hidden>)
 >Re: Abusing targetForAction: with non-action selectors (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Abusing targetForAction: with non-action selectors
  • Next by Date: Re: Abusing targetForAction: with non-action selectors
  • Previous by thread: Re: Abusing targetForAction: with non-action selectors
  • Next by thread: Re: Abusing targetForAction: with non-action selectors
  • Index(es):
    • Date
    • Thread