Skip navigation.
 
mlActivate menubar menu programatically?
FROM : Justin Hawkwood
DATE : Mon Nov 19 18:32:02 2007

I'm trying to get one of my menubar menus to show up when a specific 
action is taken, but cannot seem to figure out how.  I have tried the 
following, but nothing happens:

   NSEvent* event = [NSEvent mouseEventWithType: NSLeftMouseDown
                        location: NSMakePoint(100.0, 10.0)
                        modifierFlags: 0
                        timestamp: 0
                        windowNumber: 0
                        context: [NSGraphicsContext currentContext]
                        eventNumber: 0
                        clickCount: 1
                        pressure: 1.0];
   [NSApp mouseDown:event];


I am winging most the arguments passed in to mouseEventWithType.  I 
have also looked for a way to cal performClick, but to no avail.

Any suggestions would be greatly appreciated.

Related mailsAuthorDate
mlActivate menubar menu programatically? Justin Hawkwood Nov 19, 18:32
mlRe: Activate menubar menu programatically? Eric Crichlow Nov 19, 20:37