NSAccessibilityPressAction on NSMenuItem
NSAccessibilityPressAction on NSMenuItem
- Subject: NSAccessibilityPressAction on NSMenuItem
- From: Remco Poelstra <email@hidden>
- Date: Sat, 12 Jul 2014 14:44:17 +0200
Hi,
I'm trying to perform an NSAccessibilityPressAction on a NSMenuItem in my own app.
Currently I've this:
[[[NSApplication sharedApplication].menu itemAtIndex:2] accessibilityPerformAction:NSAccessibilityPressAction];
I get back an "unrecognised selector sent" message.
When I try to traverse the accessibility objects using
[[NSApplication sharedApplication] accessibilityAttributeValue:NSAccessibilityMenuBarAttribute];
I get back a plain NSMenu, to which I also can not send any accessibility messages. The inspector on the other hand seems to be able to get to an AXMenuItem and send the press action to it.
How do I get that AXMenuItem? Or how can I send the press action to a menu item?
Thanks in advance.
Kind regards,
Remco Poelstra
_______________________________________________
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