Re: Retaining an AXUIElementRef
Re: Retaining an AXUIElementRef
- Subject: Re: Retaining an AXUIElementRef
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 25 Jun 2013 12:45:34 -0400
On Jun 25, 2013, at 12:20 PM, Mike Engber < email@hidden> wrote: On Jun 24, 2013, at 10:34 PM, Patrick Cusack <email@hidden> wrote:
Considering this, what is best practice for making sure you have the object you think you have cached? I can always check its title attribute. Is there a faster way?
Watching for NSAccessibilityUIElementDestroyedNotification's and using them to clear out an refs you are caching is the best practice - it sounds like you are already doing this.
I use a similar technique in UI Browser <http://pfiddlesoft.com/uibrowser> to temporarily cache limited information about the destroyed UI element, in order to display it in a different text color in UI Browser's view of the current UI element hierarchy. At the moment you receive the element-destroyed notification, I understand from the documentation that a couple of pieces of information describing the destroyed UI element are still valid (the type and the process PID, if I recall correctly). |
_______________________________________________
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