Re: Menu bug?
Re: Menu bug?
- Subject: Re: Menu bug?
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 15 Mar 2003 14:39:52 -0500
on 03-03-15 2:20 PM, Eric Schlegel at email@hidden wrote:
>
On Saturday, March 15, 2003, at 07:04 AM, Bill Cheeseman wrote:
>
>
> But when you get the
>
> AXChildren of a menu bar, they show only AXMenus, omitting the
>
> apparently
>
> spurious intervening AXMenuItems. It appears that one way of viewing
>
> the
>
> menu bar hierarchy (getting the element at a point on the screen)
>
> shows a
>
> different hierarchy than the other way of viewing it (AXChildren).
>
>
This is just a bug. The Menu Manager attempts to always present a view
>
of the menu hierarchy as you see it using GetElementAtPoint: the
>
children of menus are menu items, the children of menu items are
>
submenus, and the menubar is just another menu (the root menu).
>
However, the implementation of GetChildren for the root menu actually
>
returns menu objects, not menu item objects. It should be returning
>
menu item objects.
Thanks for the info.
I now have a working workaround that substitutes the menu for the menu item
whenever I get the path based on GetElementAtPoint from a submenu or a menu.
That's the reverse of what you're describing as the ideal.
I guess I could do it the other way by calling GetElementAtPoint: on the
location of the child menu, and substituting the resulting menu item into
menubar's AXChildren attribute. That strikes me as too hard.
I would also have to worry about how to generate my own result in place of
the AXChildren attribute generate the corresponding AppleScript.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.