Re: AXMoved and AXResized notifications don't work?
Re: AXMoved and AXResized notifications don't work?
- Subject: Re: AXMoved and AXResized notifications don't work?
- From: Bill Cheeseman <email@hidden>
- Date: Thu, 25 May 2006 07:09:20 -0400
- Thread-topic: AXMoved and AXResized notifications don't work?
on 2006-05-24 3:14 PM, Bill Cheeseman at email@hidden wrote:
> on 2006-05-24 10:44 AM, Tom Bunch at email@hidden wrote:
>
>> I'll be interested in hearing how much success you have with that.
>> Besides scrollers, I think you'll need to watch out for split views,
>> views in drawers that get resized (is AXWindowResized sent for
>> these?), maybe browser columns for things like AXFinderItems. Then
>> there's the oddball app that just calls setFrame*: willy nilly. The
>> window for an AXFinderItem is, I think, always going to be Finder's
>> AXMainWindow, so that might be a workaround for the other bug you
>> mentioned.
>
> The split views problem occurred to me moments after I clicked the send
> button. I'll experiment with that and the others you mention, and more, over
> the next day or two and see what happens. I think it's clear, however, that
> my approach will have many holes.
Drawers: In Tiger, according to the docs, a drawer's window is the parent
window, not the drawer window. Ditto for sheets. So you can't register the
"real" drawer window or sheet window for the AXWindowMoved/AXWindowResized
notifications using the accessibility API. Accordingly, resizing a drawer
independent of its parent window is not captured.
Browsers: UI elements inside browser views are always in scroll areas, so
registering to observe AXValueChanged on the application enables you to know
when UI elements anywhere inside a browser view have scrolled. In fact, the
AXValueChanged notification is sent continuously by scroll bars. In my UI
Browser 2.0, when a cell within a browser is highlighted, scrolling the
browser causes the highlighting overlay window to reposition itself on
screen accordingly, and the motion is generally very smooth and continuous.
It's a pleasure to watch.
Splitters: Splitter bars have a settable AXValue attribute that works just
like scrollbar values. However, it appears that splitters do NOT emit
AXValueChanged notifications. This would appear to be an accessibility API
BUG (can somebody confirm this?). If splitters did emit the AXValueChanged
notification, my trick for observing scroll bar value changes (i.e.,
registering for the AXValueChanged notification at the application level)
would also work reliably for splitters and, therefore, for split panes. (In
many cases, my trick does nevertheless work for splitters, because when you
move a splitter bar the values of many other UI elements usually also
change, especially if the split panes have scroll bars whose thumb position
changes when the scroll bar's length is changed. But this is not entirely
reliable because sometimes split panes are empty.)
Finder items: Putting a Finder window into icon view mode and moving a
Finder item icon around can't be observed, because the Finder item does not
implement AXMoved.
--
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