• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Activate menubar menu programatically?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Activate menubar menu programatically?


  • Subject: Activate menubar menu programatically?
  • From: Justin Hawkwood <email@hidden>
  • Date: Mon, 19 Nov 2007 09:32:02 -0800

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.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Method parameter is sometimes zeroed (weird problem)
  • Next by Date: Custom text via Core Text in a layer.
  • Previous by thread: Re: Method parameter is sometimes zeroed (weird problem)
  • Next by thread: Re: Activate menubar menu programatically?
  • Index(es):
    • Date
    • Thread