• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keeping open menu after mouse up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Keeping open menu after mouse up (From: Ryan Joseph <email@hidden>)
 >Re: Keeping open menu after mouse up (From: Graham Cox <email@hidden>)

  • Prev by Date: Multiple? Call-back methods for AVPlayer
  • Next by Date: Re: Multiple? Call-back methods for AVPlayer
  • Previous by thread: Re: Keeping open menu after mouse up
  • Next by thread: Prevent side subviews of NSSplitView from resizing during window zoom
  • Index(es):
    • Date
    • Thread