Re: Question about menuHasKeyEquivalent:forEvent:target:action:
Re: Question about menuHasKeyEquivalent:forEvent:target:action:
- Subject: Re: Question about menuHasKeyEquivalent:forEvent:target:action:
- From: Ken Thomases <email@hidden>
- Date: Mon, 07 Oct 2013 16:14:33 -0500
On Oct 7, 2013, at 4:04 PM, Steve Mills wrote:
> On Oct 7, 2013, at 15:19:31, Ken Thomases <email@hidden> wrote:
>
>> Also, if you answer NO, then presumably NSMenu keeps searching and may find another match (perhaps not even among your menu items; perhaps for a Service or whatever). Then, both actions would fire.
>
> I mistakenly typed NO in my original message. It should've said:
>
> To work around this, I am simply returning YES from menuHasKeyEquivalent and calling performActionForItemAtIndex: from it. Is that a valid workaround?
I guess it's moot in light of my other point but: then NSMenu is sure to invoke the returned action on the returned target (in the case where it was really intending to perform the key equivalent), wouldn't it? Or are you setting the target and action to values that will do nothing?
Regards,
Ken
_______________________________________________
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