문제

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