Re: How to know which items are selected in the Finder?
Re: How to know which items are selected in the Finder?
- Subject: Re: How to know which items are selected in the Finder?
- From: David Niemeijer <email@hidden>
- Date: Mon, 29 May 2006 21:28:34 +0200
Hi Bill,
At 12:59 -0400 29/5/06, Bill Cheeseman wrote:
on 2006-05-29 10:39 AM, David Niemeijer at email@hidden wrote:
I need to keep track of what items(s) are selected in the Finder as
the user navigates around with the tab and cursor keys. Which
notifications should I ask for an on which elements. I am a bit at
loss here. When an AXBrowser gets focus, how to know what is
currently selected and how to observe changes of the selection in
that browser?
If you register to observe the root application element, you receive
notifications for every UI element in the application. This is intended to
make it easy to monitor all of the application's UI elements at once,
without having to register to observe each element separately.
Are you sure this really works for all notifications, those from
menus, from text fields, etc. No hidden surprises as far as you know?
But that doesn't answer the heart of your question, which is What
notification to monitor? I'm finding that the Finder is very buggy with
regard to accessibility. Once a Finder window is in browser mode, changing
the selection does NOT issue Focused UI Element Changed notifications --
this actually isn't a bug, though, because the Assitive Applications release
note explains that the only UI elements that can receive focus are those
that are settable. However, the Selected Children Changed notification is
quite reliable for Finder browser view navigation. In table views, you might
want to try Selected Rows Changed and Selected Columns Changed. Some of
these are new in Tiger.
Ok, I will look into these.
In general, the best (and only practical) way to explore and experiment with
notifications is to use PreFab UI Browser's Notifications drawer to register
notifications, then open its Notification Log window to watch the
notifications roll in in real time. You can learn a lot about how
notifications actually work this way, and see the differences among
different target applications. Go to <http://www.prefab.com/uibrowser/> to
download a free 30-day trial version.
I am using it all the time, but one of the things that bugs me is
that some elements change briefly in response to a click or focus
change and that seems hard to capture. For example, the menubar has
an array of selected children that may contain the currently selected
menubaritem, but I have find no way to actually get to see that in
UIB (or the Accessibility Inspector) as I cannot freeze that state
and navigate to it at the same time in UIB. Using the hotkey picks
the item that is deepest down in the hierarchy so I need to navigate
pack to the menubar and by that time of course nothing is selected
anymore. But, maybe I am just doing something wrong.
I have not used it for notifications yet, sounds like that is what I
should be using it for too. BTW, any plans for a UB version? It's a
wonderful tool.
Thanks,
david.
_______________________________________________
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