Re: Abusing targetForAction: with non-action selectors
Re: Abusing targetForAction: with non-action selectors
- Subject: Re: Abusing targetForAction: with non-action selectors
- From: Graham Cox <email@hidden>
- Date: Tue, 16 Sep 2008 09:35:17 +1000
On 16 Sep 2008, at 6:13 am, Dave Dribin wrote:
Is it safe to use -[NSApplication targetForAction:] with non-action
selectors? For example, selectors that have more than one argument,
non-id first argument, or return values?
The documentation for targetForAction:to:from: seems to imply it
just does a respondsToSelector: on each object in the responder
chain, and it seems to behave this way in my tests. I'd just like
to make sure it is safe to rely on this behavior, or if we should
find some other approach.
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.
cheers, Graham
_______________________________________________
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