Retaining an AXUIElementRef
Retaining an AXUIElementRef
- Subject: Retaining an AXUIElementRef
- From: Patrick Cusack <email@hidden>
- Date: Sun, 23 Jun 2013 23:03:30 -0700
I am creating a cache of AXUIElementRefs for another application's gui objects. I keep a cache of these elements and periodically refer to them (check their titles, etc). What I have noticed is that if I examine these cached elements from time to time, it appears that the underlying UI object they refer to can change. I have two particular AXUI references that point to another object unrelated to what I have cached if activate certain features in the targeted application's gui. If I unactivate said feature, the references point back to my original targets.
I have set up an observer on the application to query an AXUI elements that are destroyed, and I don't see my cached objects destroyed. How could the references I have cached be changed behind my back? I store the elements in a mutable dictionary. I caste them to (id) and add them to the dictionary. This wouldn't cause any issues I assume.
Thoughts?
Patrick
_______________________________________________
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