Re: Finder Moves its AXFinderItem around?
Re: Finder Moves its AXFinderItem around?
- Subject: Re: Finder Moves its AXFinderItem around?
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 18 Feb 2005 06:32:47 -0500
I see you haven't gotten a reply yet, so I'll give it a shot.
on 2005-02-16 12:37 PM, Matt Budd (Madentec) at email@hidden wrote:
> I was messing with UIElementInspector and the Finder (10.3.8), and
> noticed some slightly strange behavior.
>
> - If the finder window is in List mode, then none of the files show up
> in UIElementInspector (i.e. Finder doesn't expose a AXFinderItem).
I believe that an AXFinderItem is not a reference to a file, but a reference
to the iconic representation of a file that appears in a Finder window's GUI
in icon view or column view. After all, the accessibility API is all about
the GUI, not about the underlying file system.
In a Finder window in list view, the representation of a file is as a text
field in a row in an outline view (and the text field contains both an image
UI element [the icon] and a text UI element), not as a Finder item. You and
I might have implemented the Finder's list view differently, but this is how
Apple implemented it. (Actually, the surprise from my point of view is that
column view doesn't use text fields, as list view does, because the columns
in column view are more directly analogous to lists [table views or outline
views] than to collections of freeform icon items.)
> - If the finder window is in Icon mode, then they do show up as
> AXFinderItems, but it seems that Finder moves the item that I Lock
> onto. To see this, open up a finder window in icon mode, Lock onto one
> of the icons and choose highlight in the interaction window, and then
> select one of the other icons in the finder window. Then hit refresh on
> the interaction window and you will see that the AXFinderItem you
> locked onto is now a different one (and it's even different than the
> one that you selected in Finder)...it seems to be a cyclical pattern.
I don't see the icons move when I try this, but I think I may have
misunderstood what you mean by "move." Perhaps you mean that
UIElementInspector highlights a different icon than you expect it to
highlight?
I do see that UIElementInspector highlights the "wrong" icon if you select a
different icon in the Finder AFTER locking down UIElementInspector on the
first icon. I don't have time to explore what's happening here, but it would
seem that UIElementInspector is highlighting whatever icon is currently
selected in the Finder even though UIElementInspector itself is locked on
another icon. If this is right, then it's just a logic bug in how
UIElementInspector's highlight button is implemented -- it's using a
non-lockdown mode for the highlight button when the rest of
UIElementInspector is locked. I can imagine that this logic error might
propagate somehow as you continue to work with a locked UIElementInspector
in the Finder window.
> - If the finder window is in Column mode, then the icons show up as
> AXFinder Items, and this weird "moving" behavior doesn't happen and
> everything works as you'd expect.
Since column view doesn't allow spatial movement of icons, I'm not sure why
you would expect to see "moving" behavior in column view.
If you mean only that you don't see the wrong icon being selected in column
view, I don't either.
> - When you switch between modes, the AXFinderItem becomes undefined.
> Wouldn't we expect that it would be constant regardless of view mode?
>From playing with Finder views in PreFab UI Browser, I see that the
accessibility API considers that all of the UI elements in one view are
"destroyed" when you switch window views. This is entirely consistent with
the theory underlying the accessibility API -- It is focused on the GUI as a
user with disabilities would see it, so when a UI element is no longer
visible, it no longer exists. There are many "close cases" when deciding how
to implement this theory, but that's how it appears to have been implemented
for Finder window views.
Nevertheless, brief experimentation with UI Browser suggests that the
AXFinderItems that appear in icon view and in column view can be referenced
by the same title attribute, as I would expect. They can also be referenced
by the same index number when scripting Finder window views using GUI
Scripting (which is based on the accessibility API), so you can write
scripts that will work in either of those views (as long as you account for
the differing containment hierarchies).
UI Browser is available at <http://www.prefab.com/uibrowser/>.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
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