Re: Accessibility Problems...
Re: Accessibility Problems...
- Subject: Re: Accessibility Problems...
- From: Håkan Waara <email@hidden>
- Date: Mon, 11 Sep 2006 12:47:25 +0200
For the record, I'm also unable to use NSAccessibilityDebugLogLevel
from Xcode (I tried both as env var and command line switch). Haven't
tried using gdb from the Terminal yet though.
/Håkan
8 sep 2006 kl. 20.00 skrev Joseph Kelly:
I added hit testing, and it all just works now. Well, except that
NSAccessibilityDebugLogLevel won't work from Xcode (neither as a
command line flag nor environmental variable). I suspect it's just
an Xcode thing, as I can use it from Terminal which is all I need.
Thanks
Joseph K.
On Sep 8, 2006, at 10:16 AM, Mike Engber wrote:
On Sep 8, 2006, at 9:08 AM, Joseph Kelly wrote:
Use the debugging environment variable
NSAccessibilityDebugLogLevel with a value of one.
Specify it in xcode (edit active executable)
or by launching your app from the command line
foo.app/Contents/MacOS/foo -NSAccessibilityDebugLogLevel 1
It will spew informative messages to the console.
I have set this variable (as both an environment variable and
command line from Executable Info) but so far no info on the
console. I even quit and relaunched Xcode :-) Are there any other
variables I need to set, or other incantations?
This flag works. There are no tricks apart from spelling it right.
The leading dash is not part of the environment variable name -
it's just part of the command line syntax. The output will go to
your debugger console.
Another common problem is returning an ignored ui element.
NSAccessibilityDebugLogLevel will catch this too. The utility
fns NSAccessibilityUnignoredAncestor and
NSAccessibilityUnignoredDecendant help solve this.
Will this ever become an issue if the parents and descendants up
the chain all return NO for accessibilityIsIgnored:?
Not within your hierarchy, but at some point, one of the elements
in your hierarchy will have a parent that's an NSView - it's
essential to do it there if that NSView is ignored. In general,
using NSAccessibilityUnignoredXXX is just a good habit to get into.
Also, I'm hoping to make my accessible objects nested/
hierarchical -- they will contain "subviews" (i.e. return sub-
children) etc. Will I have to do anything special for hit testing
or will the accessibility framework be able to figure out from
the position/size of all the children and sub-children?
Nope - you have to do the hit testing.
For your custom object you need to implement _all_ the methods in
the accessibility protocol, including:
- (id)accessibilityHitTest:(NSPoint)point;
For hit testing, accessibility will narrow down things to the
NSView - further hit testing in your hierarchy needs to be done by
your accessibilityHitTest methods. Each element should figure out
which child was hit, and then call accessibilityHitTest on that
child & return that result. If the point isn't over one of your
children (or you're childless) return yourself.
See the sample code for an example.
-ME
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (Accessibility-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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