Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
- Subject: Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
- From: John Louch <email@hidden>
- Date: Wed, 07 Jun 2006 15:11:20 -0700
- Thread-topic: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
Title: Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
Are you calling:
extern CFRunLoopSourceRef AXObserverGetRunLoopSource (AXObserverRef observer);
And adding that source to your runloop?
Thanks,
jl
> Thanks again, Bill.
>
> I've seen this technique work in your code, and believe me, it's
> giving me a big inferiority complex right now. I swear my code is
> utterly, completely flawless, with the one minor exception that it
> doesn't work at all.
>
> I am finding the PID of these processes (with correct results) and
> calling AXObserverCreate(), AXUIElementCreateApplication(), and
> AXObserverAddNotification() (with appropriate parameters, all
> returning kAXErrorSuccess) and my callback isn't getting hit. I've
> made a small test app with a controller that logs tidbits of
> information. I'm going to toss it out on the list and see where it
> lands. The NSWindow this app pops up is expected to be empty - it's
> just part of the Cocoa app template I didn't bother deleting.
>
> The archive of the project is too large (62K) to post here without
> moderator approval, so I'll zip it up and put it at http://
> people.omnigroup.com/tom/AXText.zip
>
> Thanks for any suggestions.
>
> -Tom
>
>
> On Jun 6, 2006, at 3:40 PM, Bill Cheeseman wrote:
>
>> on 2006-06-06 6:05 PM, Tom Bunch at email@hidden wrote:
>>
>>> Ah! My bad. I am not observing the proper pid. Still don't know
>>> how to do this, but at least now I know I'm not doing it right. ;-)
>>
>> Register the root application element, not the menu, for the
>> AXMenuOpened
>> notification, then check the notification to see if it's the menu
>> you want.
>>
>> You would register the Dock application (in /System/Library/
>> CoreServices)
>> for Dock menu items. I know this works, because I just did it with UI
>> Browser's Notifications drawer, and I see the notifications rolling
>> in in
>> the Notifications Log window.
>>
>> [...]
>
> _______________________________________________
> 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
--------------------------------------------------
John Louch Internet #: email@hidden
_______________________________________________
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