Ahh, I see. Now provided that I'm building an accessibility application which attempts to track user focus by finding the focused window and focused UI element, how can I get that information when the main thread of the selected application is busy with the Keychain dialog ? (by the way, the application in question is Safari).
Dave Poirier Senior Software Developer cell: 18192097798 skype: ekscrypto
All I need is a towel, everything else can be answered by 42.
On 2012-12-31, at 2:41 PM, Greg Hughes < email@hidden> wrote: The main thread of the other application is blocked, busy waiting for the modal security dialog.
Sent from my iPad On Dec 31, 2012, at 2:35 PM, Dave Poirier < email@hidden> wrote: What would cause the main thread to block during a call to AXUIElementCopyAttributeValue on the main thread itself?
i.e.: - from the main thread… - NSLog.. - AXUIElementCopyAttributeValue().. - NSLog..
I was under the impression the main thread was uninterrupted during execution of a method call; are there notifications or services which could cause the main thread to be preempted ?
Dave Poirier Senior Software Developer cell: 18192097798 skype: ekscrypto
All I need is a towel, everything else can be answered by 42.
On 2012-12-31, at 2:19 PM, Greg Hughes < email@hidden> wrote: Accessibility inter-process-communication (IPC) calls are handled by the main thread. If the main thread of the application you are requesting information from is blocked or busy then then IPC request will timeout. This timeout can be changed.
Sent from my iPad On Dec 31, 2012, at 12:43 PM, Dave Poirier < email@hidden> wrote: Hello everyone,
Has anybody else encountered situations where AXUIElementCopyAttributeValue can take up to 6 seconds before returning nil?
I'm running the following piece of code on the main thread of my background app:
-(AXUIElementRef) getElementAttribute:(CFStringRef)name { NSLog(@"getElementAttribute: %@", name); AXUIElementRef value; if (AXUIElementCopyAttributeValue(_element, name, (CFTypeRef *)&value) != kAXErrorSuccess) { NSLog(@"getElementAttribute end with nil"); return nil; } NSLog(@"getElementAttribute end"); return value; }
It works reliably until a foreground application Keychain password prompt comes up, at which point I see this starting to occur in the logs of my background app:
2012-12-31 12:13:38.770 UndisclosedApp[2554:303] getElementAttribute: AXFocusedUIElement 2012-12-31 12:13:44.771 UndisclosedApp[2554:303] getElementAttribute end with nil
I'll be filing a bug report a little later with some sample code once I can isolate the smallest combination of factors to reproduce the issue, but I was curious to see if anybody else encountered a similar situation.
Thanks,
Dave Poirier Senior Software Developer cell: 18192097798 skype: ekscrypto
All I need is a towel, everything else can be answered by 42.
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
|