Re: Strange kAXErrorAPIDisabled error on AXObserverAddNotification
Re: Strange kAXErrorAPIDisabled error on AXObserverAddNotification
- Subject: Re: Strange kAXErrorAPIDisabled error on AXObserverAddNotification
- From: Eric Schlegel <email@hidden>
- Date: Mon, 29 May 2006 10:55:03 -0700
On May 29, 2006, at 7:30 AM, David Niemeijer wrote:
When I call AXObserverAddNotification early on in my application I
am getting a -25211 (kAXErrorAPIDisabled) error when I install the
notification for my app's own PID, not when I do the same for, for
example the Dock. AXAPIEnabled() returns true and I have Access for
Assistive Device turned on all the time. I am installing a
kAXFocusedUIElementChangedNotfication in case that matters and
running 10.4.6 on Intel.
Anyone an idea why I might get that error despite the fact that AX
is enabled....
I think you're calling this API before Carbon or Cocoa have a chance
to register the app with the AX implementation. Try delaying your
AddNotification call until you've made at least one call to the
runloop. One easy way to do this without processing any events is to
call RunCurrentEventLoop(0).
-eric
_______________________________________________
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