Re: Keeping open menu after mouse up
Re: Keeping open menu after mouse up
- Subject: Re: Keeping open menu after mouse up
- From: Ryan Joseph <email@hidden>
- Date: Sun, 30 Oct 2011 20:56:08 +0700
Thanks for tip but the menu still closes on mouse up. I wonder what the difference is. The event from [NSApp currentEvent] is showing as a LMouseDown which is good but the menu still takes the mouse up and closes even though you would think it should behave like a normal menu click.
On Oct 29, 2011, at 6:40 AM, Graham Cox wrote:
> I have a similar case, and it works OK.
>
> What I do is on mouseDown, start a timer. When that fires, it grabs [NSApp currentEvent] and passes that as the event to the popUpContextMenu: method. The menu tracks as expected.
>
> The only kink was that because this was being done within a button cell's tracking, I had to post a fake mouse UP after the menu was closed to ensure that the cell ended tracking. For a view that may not be necessary unless you're doing something special on mouse up.
>
> --Graham
Regards,
Ryan Joseph
thealchemistguild.com
_______________________________________________
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