• 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: Counting children of menubar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Counting children of menubar


  • Subject: Re: Counting children of menubar
  • From: Guy Fullerton <email@hidden>
  • Date: Tue, 05 Nov 2002 10:32:01 -0800

On 11/5/02 2:36 AM, "Bill Cheeseman" <email@hidden> wrote:

> I'm writing a Cocoa framework to wrap the Carbon assistive application APIs.

FYI: The Accessibility APIs (in <HIServices/Accessibility.h> and its
sub-headers) are neither Carbon nor Cocoa APIs. They're just APIs.

> Instead, to get the count of children, I use AXUIElementCopyAttributeValue
> to load the AXChildren attribute (an array value) itself, then use an array
> function to count the items in the array.
>
> And to get the children, I use AXUIElementCopyAttributeValue to load the
> AXChildren array as above, then use the count workaround and an array
> function to get the subarray from index for length maxItems.

Those are both excellent workarounds.

> These workarounds are so easy that I am led to believe the
> AXUIElementGetAttributeValueCount and AXUIElementCopyAttributeValues
> functions are merely convenience functions that work the same way.

Actually, they don't necessarily work that same way. (They do in some cases,
but not in others.) Carbon and Cocoa can have much more efficient ways of
generating counts of attributes or sub-ranges of attribute arrays than
fetching the whole attribute array. Cocoa does some of this now, and Carbon
will do it in the near future.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Counting children of menubar
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: Counting children of menubar (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: UIElement Inspector sample code posted
  • Next by Date: Re: Counting children of menubar
  • Previous by thread: Re: Counting children of menubar
  • Next by thread: Re: Counting children of menubar
  • Index(es):
    • Date
    • Thread