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: Graham Cox <email@hidden>
- Date: Thu, 30 May 2013 08:59:58 +1000
On 30/05/2013, at 8:41 AM, Steve Mills <email@hidden> wrote:
> but the menu is not closing before the action executes
This is normal. I think the idea is that the user gets a cue that whatever action is being executed "came from" a menu choice, so the menu remains visible while the action is carried out.
Further, if you don't want this, calling -cancelTracking probably only schedules the closure, and requires some iterations of the runloop to take effect. The easiest solution might be not to directly invoke your action, but schedule that to be performed after a short delay (maybe 0), which will let the menu close first before invoking the action.
--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