Re: Archiving or copying observers and elements
Re: Archiving or copying observers and elements
- Subject: Re: Archiving or copying observers and elements
- From: Raymond Fischer <email@hidden>
- Date: Thu, 12 Dec 2002 12:23:57 -0800
On Thursday, December 12, 2002, at 08:47 AM, Bill Cheeseman wrote:
on 02-12-12 9:36 AM, John O. Louch at email@hidden wrote:
You can only retain the AXObserverRef and AXUIElementRef objects.
What do
you mean by archiving? You cannot store an AXUIElementRef from an app
beyond the lifetime of that app/element. I.e. If you quit the
application
that the AXUIElement references then the element will become invalid.
Can you give me an example on why you need a copy primitive?
1. You're correct that the AXObserverRef and AXUIElementRef objects
can't be
used to communicate with the target application or the UIElement after
the
target application or the UIElement is gone. But the reference might
still
be useful for my assistive application's management of its internal
data
structures. For example, the reference could be used with CFEqual to
clean
out any cached references I still have hanging around after a
UIElement is
destroyed. (Mike Engber explained that possibility to me recently.) In
the
process of designing such a system, it might prove useful on occasion
to
make a copy of the reference instead of just CFRetaining it again,
depending
on what I'm doing and how I'm handling memory management.
While I'm no expert with Mac accessibility (is anyone?) I've found that
caching AXUIElementRefs to be less than useful. It has been bad to
assume that an application will always give you the same AXUIElementRef
for a given HIObject. The app may just create a new one each time.
Besides, isn't copying an AXUIElementRef just a matter of getting the
HIObject and ID and putting them into a new AXUIElementRef? Am I
missing something?
----
Ray Fischer
Adobe Systems
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.