selecting NSPopUpButton control with Accessibility API
selecting NSPopUpButton control with Accessibility API
- Subject: selecting NSPopUpButton control with Accessibility API
- From: aldo kurnia <email@hidden>
- Date: Mon, 8 Oct 2007 14:08:46 -0700 (PDT)
Hi everyone,
I'm currently doing an accessibility project and currently having problem with the PopUpButton controls. Basically all I want to do is to select one of the item on the PopUpButton menu using the accessibility API.
I'm able to get the AXUIElementRef of the control, but the only actions available to this control is AXPress and AXShowMenu and it doesn't have any children. When I used the Inspector to detect the menu option (class AXMenuItem), it seems that the menu item's grandparent is the PopUpButton control. So I assumed that the children will only appear when the button is being pressed ( when the menu show up), so I tried to do something like this:
AXUIElementPerformAction(mybutton, kAXShowMenuAction);
NSArray *buttonChildren;
AXUIElementCopyAttributeValue(mybutton, @"AXChildren", &buttonChildren);
printf("mybutton has %i children\n", [buttonChildren count]);
but the children count always comes out as
0.
Changing the AXValue attribute of the control doesn't seem to be possible either.
What did I do wrong and how can I select one of the menu items on the PopUpButton?
Any help would be appreciated as I'm new to Mac development
and couldn't find any answer anywhere else.
Thanks!!
Check out the hottest 2008 models today at Yahoo! Autos.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden