Re: Menu bug?
Re: Menu bug?
- Subject: Re: Menu bug?
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 15 Mar 2003 10:04:36 -0500
on 03-03-15 9:03 AM, Bill Cheeseman at email@hidden wrote:
>
In my app (PreFab UI Browser), I'm getting a menu UI element in two
>
different ways. To my surprise, CFEqual says the two UI elements don't
>
represent the same user interface object. Yet I have confirmed that they do,
>
by testing whether both have kAXMenuRole and whether their AXTitle
>
attributes are identical.
Correction: I was only testing the role of one of the UI elements, which is
AXMenu. When I test the role of the other, it is AXMenuItem. Yet they both
seem to represent the same UI element. That's apparently why they don't
compare as CFEqual, and my workaround fails if I also test for the role of
the other.
This happens with both Cocoa and Carbon targets.
This appears to be a bug in accessibility. I see that UI Element Inspector
also shows a menu as an AXMenuItem in the menu bar when you hold the mouse
over the menu's title in the menu bar. And if you then open the menu and
hold the mouse over a menu item, the hierarchy shows AXMenuBar > AXMenuItem
"View" > AXMenu "View" > AXMenuItem "<whatever>". 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).
Come to think of it, I think I remember reporting something like this a long
time ago. I didn't realize the significance of it then. What exactly is
going on?
--
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.
References: | |
| >Menu bug? (From: Bill Cheeseman <email@hidden>) |