Re: How to determine if a sheet is topmost
Re: How to determine if a sheet is topmost
- Subject: Re: How to determine if a sheet is topmost
- From: BK <email@hidden>
- Date: Fri, 3 Nov 2006 12:03:32 -0800
On a related note, is there anyway to determine the role of the
AXUIElementRef that is destroyed? My app receives the
NSAccessibilityUIElementDestroyedNotification notification, so it
knows when a window has been closed. But when I try to determine the
role of the destroyed AXUIElementRef, I receive this error:
kAXErrorInvalidUIElement = -2520. Does this mean the role of the
destroyed AXUIElementRef cannot be determined? I'm just trying to
find out if the closed window is a sheet or modal window or normal
window.
Thanks,
Bill
On Nov 2, 2006, at 1:11 PM, Guy Fullerton wrote:
IIRC, sheets have a role of AXSheet. Testing the role is probably
the best way to determine whether an element is a sheet.
The AXTopLevelUIElementAttribute definitely isn't what you want.
The top-level UIElement for a given element is the sheet/window/
drawer that the given element resides in.
On Nov 2, 2006, at 12:00 PM, email@hidden wrote:
My code receives notifications from the following:
NSAccessibilityTitleChangedNotification
NSAccessibilityFocusedWindowChangedNotification
NSAccessibilityMainWindowChangedNotification
I can then get the window title and other elements without any
problems. For example, I use this to obtain the window title:
axErr = AXUIElementCopyAttributeValue( inElement,
kAXTitleAttribute, &cfRef );
However, I want to determine if the top window is a sheet or not.
I tried using
axErr = AXUIElementCopyAttributeValue( inElement,
kAXTopLevelUIElementAttribute, &cfRef );
but I keep getting this error in return:
kAXErrorAttributeUnsupported = -25205,
Is this the correct method to determine if the top window is a
sheet or not?
Thanks!
_______________________________________________
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