• 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: Accessibility overrides leads to leaks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessibility overrides leads to leaks?


  • Subject: Re: Accessibility overrides leads to leaks?
  • From: James Dempsey <email@hidden>
  • Date: Mon, 13 Sep 2010 12:05:55 -0700

On Sep 11, 2010, at 4:10 AM, Christiaan Hofman wrote:

> I have a problem where setting an accessibility override seems to lead to a leak. hat I'm doing is taken from the AXCanvas sample code, in particular -[CanvasDocBorderView awakeFromNib], i.e. using accessibilitySetOverrideValue: to set the parent (window) for an extra view added to a scroll view. This is necessary because there does not seem to be any other way to make such a view accessible. But what I see is that the window isn't deallocated after it's closed, which means that accessibilitySetOverrideValue: creates a retain loop and therefore a leak. Is this a known problem? And is there a way to fix this?

-accessibilitySetOverrideValue:forAttribute: retains the value object that is set.  You can set the override value to nil when the window closes by listening to notification.

It is not advised, though, to set overridden values for attributes such as AXRole, AXParent, AXChildren - but only for attributes such as AXDescription, AXHelp, AXTitleUIElement.

This is because calling -accessibilityAttributeNames: does not take the overridden attribute into account - so any internal accessibility code asking for these fundamental attributes will get the wrong value.

The best practice for changing the value of attributes such as AXRole, AXParent, AXChildren is to return the different value in a subclass.

-James

--------------------------------------------------
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

  • Follow-Ups:
    • Re: Accessibility overrides leads to leaks?
      • From: Christiaan Hofman <email@hidden>
References: 
 >Accessibility overrides leads to leaks? (From: Christiaan Hofman <email@hidden>)

  • Prev by Date: Accessibility overrides leads to leaks?
  • Next by Date: Re: Accessibility overrides leads to leaks?
  • Previous by thread: Accessibility overrides leads to leaks?
  • Next by thread: Re: Accessibility overrides leads to leaks?
  • Index(es):
    • Date
    • Thread