Re: Register for system-wide notifications?
Re: Register for system-wide notifications?
- Subject: Re: Register for system-wide notifications?
- From: Andrew Taylor <email@hidden>
- Date: Fri, 13 Sep 2002 07:53:13 -0400
At 3:34 AM +0200 9/13/02, M. Uli Kusterer wrote:
You can't get a pid on on the "System wide" - it isn't an application.
You have to walk through all the applications and register for a
notification for that event in each application.
You're kidding, right? I mean, what use does all the Accessibility
stuff have if an Accessibility application has to manually attach to
each and every application?! Surely there must be a way to be
notified from all of them??? Otherwise the user could miss a change,
after all.
--
No, for each application that you are interested in, you need to
register for the notifications that you want.
So, that also means registering for the kApplicationLaunched and
kApplicationSwitched(not positive these are spelled exactly that way)
Carbon events in your application so that the Mac OS tells you when a
new application is launched or the frontmost application changes.
Beyond that, I have found that you can't actually do your Acc. API
notification registering immediately upon being notified that an
application has launched. That notice is sent out fairly early in the
application's initialization process, and the application is not
actually ready to receive messages from the Accessibility API until
sometime later (after the first call to WaitNextEvent or Carbon
Event/Cocoa equivalent I think). So you have to cache that notice for
at least one trip around your own event loop - I delay for one WNE
and then keep trying each time through my event loop until the Acc.
API notification registration succeeds.
This is what I determined by experiment and some emails back and
forth with George Warner. If things have changed, somebody please let
us know.
_______________________________________________
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.