• 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: Custom accessible Cocoa controls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom accessible Cocoa controls


  • Subject: Re: Custom accessible Cocoa controls
  • From: Mike Engber <email@hidden>
  • Date: Mon, 30 Jun 2003 11:23:15 -0700

All you need to do it return an object that implements the accessibility protocol. It doesn't have to be an NSCell or NSView.

I've previously made this suggestion the accessibility-dev list:

When accessorizing controls I found it useful to create a placeholder class that implements the accessibility protocol (accessibilityAttributeNames, accessibilityAttributeValue:, ...). That way, when I need to return a UIElement (e.g. the thumb of a slider) I just instantiate this class.

My base version of the placeholder class just holdes a role and a parent. Usually I implement other attributes (e.g. bounds) by asking my parent for help - as opposed to trying to keep the data in the placeholder class up to date with reality.

If you want more details feel free to email me.

-ME

On Friday, June 20, 2003, at 8:02 PM, arekkusu wrote:

email@hidden wrote:
While implementing accessibility, I figured I'd need to implement -
(id)accessibilityHitTest:(NSPoint)point, but I'm not sure _what_ to
return from that method. The docs say I should return the "deepest
descendant of the accessibility hiearchy that is located under the
point". However, the area under the point is not an object, but just
graphics that we draw.


I have exactly the same problem, trying to subclass NSSlider.

I want to replace the slider knob with an resizable oblong knob. I have
the tracking and drawing working, but UIElementInspector still shows me
"AXValueIndicator" in the old knobRect which is not what I want. How am
I supposed to override accessibilityHitTest: when the knob and slider
are both drawn by the same cell?

How does the regular slider do it?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Custom accessible Cocoa controls (From: arekkusu <email@hidden>)

  • Prev by Date: RE: Writing Files
  • Next by Date: [ANN] UKPrefsPanel
  • Previous by thread: Re: Custom accessible Cocoa controls
  • Next by thread: Hundreds of unhelpful error messages! Help
  • Index(es):
    • Date
    • Thread