This question is in response to Drag and Drop with NSStatusItem

The code from @rob Keniger works for me. Following these exact steps, When I run the app, click the menu bar icon, I can drag things to my drag area and everything works. My problem is if I run the app, (then instead of clicking the menu icon first) click Finder, then click the menu bar icon, when I try to drag, the menu closes as I'm dragging.

How do I make the menu view stay open every time the user has the menu open and is dragging?

有帮助吗?

解决方案

Looks like you have to do this:

[NSApp activateIgnoringOtherApps:YES];

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top