Re: Cocoa in Carbon accessibility
Re: Cocoa in Carbon accessibility
- Subject: Re: Cocoa in Carbon accessibility
- From: James Dempsey <email@hidden>
- Date: Wed, 2 Jun 2010 07:46:44 -0700
Uli,
If I understand correctly, what you are doing is when asked for things like AXChildren, or the element at point by a Carbon event, you are returning objects that are NSObject subclasses that implement the NSAccessibility protocol. Is that correct?
If that is what you are doing, I would not expect that to work. Carbon doesn't know anything about the NSAccessibility protocol, and doesn't know what to do with Obj-C objects that implement the protocol.
In general, when mixing Cocoa and Carbon, accessibility should work pretty seamlessly for the combinations that the frameworks support:
1. Carbon windows in a Cocoa app
2. Cocoa windows in a Carbon app (supported in 10.5 and later)
3. Carbon HIViews in a Cocoa window using HICocoaView (supported in 10.5 and later)
Carbon windows don't support hosting Cocoa views, so I would not expect that to work.
I hope this helps.
-James
On Jun 2, 2010, at 6:14 AM, Uli Kusterer wrote:
> Hi,
>
> I'm trying to make a part of an app accessible. Essentially, it's a custom HIView that contains other items (which are not HIViews, but are conceptually views). Since I want to move this whole thing to Cocoa eventually, I'd like to implement the objects returned to accessibility to represent the "conceptual views" as NSObject instances, so I can just re-use them when I move to NSView.
>
> Is this possible? Do you expect this to work? Is there anything special I have to do to make this work? I've tried it, by overriding kEventAccessibleGetChildAtPoint and kEventAccessibleGetNamedAttribute (kAXRoleAttribute, kAXRoleDescriptionAttribute, kAXChildrenAttribute, kAXTitleAttribute) and just returning the Cocoa objects (since they're CFTypes, like AXObjects and HIObjects), but for some reason that makes the whole parent view no longer show up in accessibility.
>
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
>
>
>
> _______________________________________________
> 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
--------------------------------------------------
James Dempsey
AppKit Engineering
Apple
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