Scroll area and application confusion
Scroll area and application confusion
- Subject: Scroll area and application confusion
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 05 Jan 2003 11:14:18 -0500
I find that the AXUIElementCopyAttributeValue function, when called with
kAXChildrenAttribute on a TextEdit window, sometimes returns the TextEdit
application element in the array in place of the scroll area element I
expected. The other elements in the array (the three title bar buttons, the
grow area, and the static text for the window's title) are returned
correctly.
This seems to depend on the particular TextEdit window. When I get a
TextEdit window that exhibits this behavior, it does so repeatedly and
consistently. As long as it is the only TextEdit window open, that is -- if
I open a second window, then both windows return the correct scroll element;
but when I close the second window, the first reverts to returning the
application element in place of the scroll area element.
If I close the troublesome TextEdit window and open a new one, it usually
behaves correctly.
Getting a bad TextEdit window seems to happen at random. I can't discern a
pattern.
I have not seen this behavior with windows in any other application.
Questions:
1. Is this a known issue? It would seem to be a bug in TextEdit, rather than
a bug in Cocoa's implementation of accessibility. But why would TextEdit be
implementing custom accessibility routines (I haven't looked at the latest
TextEdit code)?
2. Or would this be an intermittent timing issue? Various experiences over
the last few weeks have led me to wonder if accessibility calls can be
sensitive to timing. Are there situations where a brief pause should be
introduced in a client's code?
3. Or -- here's another thought -- I always have a Cocoa text ruler showing
in my TextEdit windows. I know the accessibility API does not see TextEdit's
text rulers. I've assumed that this is true of Cocoa text rulers generally,
but I think I haven't tested it on any application except TextEdit. Might
the application element/scroll area element confusion I'm seeing be a result
of some issue with Cocoa text rulers, whether in TextEdit specifically or
Cocoa generally?
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.