Multiple notifications
Multiple notifications
- Subject: Multiple notifications
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 18 Nov 2002 17:22:15 -0500
When I create an observer for my target application and register it to
receive an application-activated notification on the root UIElement, I
always get two notifications when I activate the target application.
My home-grown console log entries read like this:
(gdb) continue
2002-11-18 16:53:41.404 Accessibility Browser[661] Notification
received:AXApplicationActivated, affected Element:<AXUIElement 0xcd0d0>
{pid=662}
(gdb) continue
2002-11-18 16:54:08.757 Accessibility Browser[661] Notification
received:AXApplicationActivated, affected Element:<AXUIElement Application
0xcd0d0> {pid=662}
Notice that the addresses of the affected elements are identical, but one is
called "AXUIElement" and the other is called "AXUIElement Application". (I'm
passing the AXUIElementRef to Cocoa's NSLog function to generate this.)
Further experimentation shows that both of these elements have the role
AXApplication.
In other circumstances, I am seeing multiple notifications with a null role.
For example, after registering for a UIElement-destroyed notification on a
window in TextEdit, I get 6 or 7 UIElement destroyed notifications listing a
null role when I close the TextEdit window.
Is all this normal? Or are things still in transition? I'm at a bit of a
loss to know how to handle these notifications, since I don't want my
handler to fire multiple times for more than one identical notification.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
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.