Drag and Drop from Dock Stack to NSStatusItem custom view doesn't work
Originator: | levi.nunnink | ||
Number: | rdar://11561760 | Date Originated: | 30-May-2012 04:44 PM |
Status: | Open | Resolved: | |
Product: | Mac OS X | Product Version: | 10.7.2 |
Classification: | Serious Bug | Reproducible: | Yes |
Summary: When a NSStatusItem has a custom NSView that implements NSDraggingDestination "performDragOperation" is never called, even though the other protocol methods are. Steps to Reproduce: 1. Set a custom view that implements NSDraggingDestination as a NSStatusItem's view. 2. Drag an item from a doc stack to the menu item. Expected Results: All the protocol methods should be correctly called, and performDragOperation should be called when an object is dropped on it. Actual Results: All the protocol methods ("draggingEntered", "draggingExited") are correctly called except for performDragOperation. When an object is dropped on the menu item, draggingExited and draggingEnded are both called but performDragOperation 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!
Found the solution to this problem on StackOverflow: https://stackoverflow.com/questions/5663887/drag-and-drop-with-nsstatusitem/26810727?noredirect=1#comment82718045_26810727 Instead of `performDragOperation:
, implement
draggingEnded:and check if released within view with:
NSPointInRect(sender.draggingLocation, _bounds)`
Still not fixed in 10.9.2
Not Fixed with MacOS 10.8.