Re: Dismissing menu from menu item that uses custom view
Re: Dismissing menu from menu item that uses custom view
- Subject: Re: Dismissing menu from menu item that uses custom view
- From: Kyle Sluder <email@hidden>
- Date: Thu, 30 May 2013 20:32:24 -0700
On Thu, May 30, 2013, at 08:30 PM, Steve Mills wrote:
> Just tried it. Didn't work. I also used NSEventTrackingRunLoopMode, since
> that's the current run loop when tracking a menu. I wish Apple had more
> people on these lists that can give definitive answers to our questions.
> It sure would help to know how Apple does it, or even better, be able to
> call something like [menuItem flashAndCancelTracking].
It's done in a private 64-bit reimplementation of the Carbon Menu
Manager that spins its own nested event loop (which you can see in a
backtrace) and then sends the action.
Seriously. Just use -performSelector:afterDelay:.
--Kyle Sluder
_______________________________________________
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