Re: [Repost] Various AXObserver questions
Re: [Repost] Various AXObserver questions
- Subject: Re: [Repost] Various AXObserver questions
- From: John Louch <email@hidden>
- Date: Tue, 18 Mar 2003 07:30:33 -0800
>
I posted this way back, but never got any reply:
>
>
>
Before getting too deep into using AXObservers, could someone answer the
>
following:
>
>
1. When does an ObserverCallback actually get called in relation to other
>
stuff triggered by RunApplicationEventLoop. I am assuming that it doesn't
>
just pre-empt whatever else I am doing at the time.
You install your observers on a CFRunLoopRef. Based on the mode you install
your callbacks will be fired inside of RunApplicationEventLoop. There is no
pre-emption as everything is serialized on a run-loop. You can if you like
create a second thread and install your observers on the run-loop for that
thread. In that case it will pre-empt.
>
>
2. (Similar to Q 1) I also assume that calls to the call-back are queued and
>
that they are not expected to be re-entrant.
Please be more clear on what you mean by re-entrant. The callbacks are
serialized so they willo not be re-entered. Are you asking if you can make
other AX calls inside of the callback, then the answer is:
1) not a good idea on 10.2.x
2) yes in the next major release.
>
>
3. I assume that AXObserverRemoveNotification doesn't need calling unless I
>
want to explicitly stop observing something that is still going to be
>
around. (in the same way you don't need to unregister Carbon Events on
>
windows when they are disposed.)
You do not have to remove observers, but in a sense you will be leaking
memory. There is a data structure in the API which holds the
AXUIElementRef, the notification, and the refcon. If you do not either
CFRelease the observer or remove the particular notification, then these
will hang around for ever.
>
>
Matt Gough
>
_______________________________________________
>
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.
---------------------------------------------
John Louch Internet #: email@hidden
(805) 546 0216
_______________________________________________
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.