• 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: Bill Cheeseman <email@hidden>
  • Date: Tue, 05 Nov 2002 06:44:12 -0500

on 02-11-04 6:08 PM, Guy Fullerton at email@hidden wrote:

> On 11/4/02 2:55 PM, "Bill Cheeseman" <email@hidden> wrote:
>
>> In the meantime, I've found that lots of the accessibility functions seem to
>> return inappropriate error numbers in response to various attributes and
>> elements.
>
> What do you mean? Why are certain errors inappropriate? (We never guarantee
> that an API will only return a particular subset of our error codes. This is
> one reason I fought *against* having a separate AXError type; it is very
> possible, and quite common for an accessibility API to produce a wide
> variety of OSStatus values.)

I suspected that this was the case. I'm writing a Cocoa wrapper for the
Carbon assistivity (is that a word?) API, and I'm not all that conversant
with Carbon error code usage. (But learning fast.)

>> I hope you're reviewing those for consistency.
>
> Please write up individual bugs. We know of some (many? most?) of the
> issues, but it's never safe to assume we'll stumble upon them all. If you'd
> like a bug fixed, you're *always* better off writing it up yourself.

Most of the problems I experienced were just what you suggested -- receiving
error values that were not included in the AXError group. Those situations
were easiest to deal with by writing a couple of very simple
does-this-attribute-exist and does-this-attribute-have-a-value utility
methods.

The only other problem I experienced may be one of documentation rather than
code. I'm not sure which AXError code I should expect to see in various
specific situations, so I'm not clear on how best to use them. The only
example I have for you is my need to bullet-proof the getting of an
attribute's value. The problem is that (1) a particular UIElement might not
implement a particular attribute, but (2) it might implement the attribute
but not provide a value for it (or not all the time). For example, the
horizontal scrollbar attribute of a browser apparently exists as an
attribute even though it doesn't have a value if the particular browser
doesn't have its horizontal scrollbar turned on. In such a case, is the
expected error kAXErrorNoValue, kAXErrorNotImplemented, or
kAXErrorAttributeUnsupported? In scenario (1) I would expect
kAXErrorAttributeUnsupported, but kAXErrorNotImplemented would make equally
good sense -- what's the difference between them? In scenario (2) I would
expect kAXErrorNoValue, but that's not what I got (I've forgotten for which
UIElement and attribute).

I know it's too early to expect final documentation, and I'm very grateful
for the existing Accessibility Reference for Assistive Applications. But it
would be really helpful to have a list of which errors can be returned by
each function, separately, and half a sentence about what each error
signifies.

Let me add that I find the whole accessibility API thrilling. I set out to
write a reusable Cocoa wrapper for the Carbon "assistivity" API to make it
easier to write an assistive app in Cocoa, and I decided to write a Cocoa
"Accessibility Browser" developer tool to test the framework and,
incidentally, make it easy to see at a glance exactly what accessibility
features are implemented in any particular Carbon, Cocoa or Java app. I
thought writing the Cocoa framework and the browser would take weeks, but
I'm more than half done in only a few days (less than a week). And I'm
astonished at how much accessibility is already implemented for free in
Cocoa (and even Carbon) applications on the street. I can actually see
UIElements and values in Internet Explorer -- extraordinary! Great work!!!

--

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.

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

  • Prev by Date: Re: Counting children of menubar
  • 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