I'm working on an application that needs to display a context menu on screen in various scenarios. In the function I'm writing, I don't have access to any NSWindows or NSViews. I'd like to use popUpMenuPositioningItem:atLocation:inView as this function works perfectly for me in 10.6. However, we have a requirement to support 10.5, so this function isn't available to me.
The feature I'm most interested in, as stated in the documentation is:
If view is nil, the location is interpreted in the screen coordinate system. This allows you to pop up a menu disconnected from any window.
Basically, I need to display the context menu given a location on screen, but without any associated view.
Is there any way to achieve this on 10.5?