I want to respond to a hotkey by showing NSMenu at the position of the mouse cursor.
My application is UIElement and does not have its own window.
I know there is an NSMenu method:
-(void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view;
But it doesn't seem to work when there is no view :(.
Should I create a fake transparent view at the mouse cursor position and then display NSMenu there, or is there a better way?
Could this be implemented using Carbon?
source share