• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Parents & children not consistent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parents & children not consistent


  • Subject: Re: Parents & children not consistent
  • From: Bill Cheeseman <email@hidden>
  • Date: Sat, 09 Nov 2002 16:36:54 -0500

on 02-11-09 8:57 AM, Bill Cheeseman at email@hidden wrote:

> I notice that the parent branch of a UIElement (its ancestors) can include
> UIElements that are omitted from the application's children branches (its
> descendants). In other words, if you walk backwards from a UIElement to its
> root by traversing its parents, you may encounter some UIElements that you
> won't see when you return along the same branch by traversing its children.

I call a UIElement that has a parent, but whose parent does not include it
among the parent's children, a "waif." That's a better metaphor than
"orphan". From my dictionary: "waif" -- "a homeless and helpless person,
esp. a lost child"; or "a stray animal".

> In the case of a ruler, it occurs to me that it would be pretty easy to
> include it in the children attribute of the scroll area. You would have to
> check whether the starting element is a scroll area and, if so, check whether
> it contains a text area among its children and, if so, use the
> AXUIElementCopyElementAtPosition function, passing in a point guaranteed to be
> where a ruler would be located if a ruler were present in the scroll area
> (taking into account that there can be vertical and horizontal rulers).

I have now implemented this, and it works like a charm. I left out the test
for a scroll area because I realized there could be a ruler associated with
a text area that isn't in a scroll area.

I add the waifs to the children, and now traversing a branch works the same
in both directions.

I just wonder if there are any other "AXUnknown" UIElements which, like text
rulers, have parents in the application tree but aren't children of any
UIElement in the application tree.

--

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.

References: 
 >Parents & children not consistent (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Application name
  • Next by Date: Parents & children not consistent
  • Previous by thread: Parents & children not consistent
  • Next by thread: Re: Parents & children not consistent
  • Index(es):
    • Date
    • Thread