Re: Window closed notification
Re: Window closed notification
- Subject: Re: Window closed notification
- From: Ryan Joseph <email@hidden>
- Date: Mon, 21 Jun 2010 15:03:57 -0600
On Jun 21, 2010, at 1:00 PM, email@hidden wrote:
> On Jun 20, 2010, at 5:45 PM, Ryan Joseph wrote:
>
>> Is there a way to get a notification when a window is closed or otherwise destroyed? This would seem like an obvious notification to get but I can't seem to find it anywhere in the reference docs
>
> You want the AXUIElementDestroyed notification. After a window is closed, a user can't use it, so the accessibility API considers it to have been destroyed even if the operating system still has it in memory somewhere.
Indeed this is what I want. However, I noticed that the AXUIElement returned in the callback didn't have any attributes so I'm not sure which window was destroyed. Is it possible that I could keep a cached list of window elements then compare them with the element from the callback? I'm not sure how safe it is to CFRetain on the element and if I really will retain ownership. Thanks for helping.
Regards,
Josef
_______________________________________________
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