NSRightMouseDownMask Flag ignored for NSStatusItem sendActionOn
| Originator: | alek | ||
| Number: | rdar://17603829 | Date Originated: | 09-Jul-2014 03:42 PM |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | |
| Classification: | Reproducible: | Always |
Summary: Sometimes you need to know which mouse button was used if you want to trigger different actions based on this. The way you should do this is you tell the statusBarItem which buttons it should respond to. Say I want to listen for Left and Right Mouse Down Events, then I would write something like: [self.statusItem sendActionOn:(NSLeftMouseDownMask|NSRightMouseDownMask)]; The problem is, with this line and my sample code, the Right Click Event is never triggered when you click with just the right mouse button. https://gist.github.com/skela/87cf62944fbfc23cb83c Steps to Reproduce: 1. Open XCode Project 2. Click Run 3. Left Click the status bar item - Notice Left Clicked Status Item is printed out in the Console (Correct) 4. Ctrl + Left Click the status bar item - Notice Right Clicked Status Item is printed out in the Console (Correct for this Code) 5. Right Click the status bar item - Notice nothing is printed out, the clickStatusItem method is never called.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Have the exact same problem (beta 3), I duplicated.