Re: Re: Re: How do I get the NSApplication of other running applications?
Re: Re: Re: How do I get the NSApplication of other running applications?
- Subject: Re: Re: Re: How do I get the NSApplication of other running applications?
- From: "Tom Harrington" <email@hidden>
- Date: Fri, 8 Sep 2006 17:02:38 -0600
On 9/7/06, Corey O'Connor <email@hidden> wrote:
On 9/7/06, Alan Smith <email@hidden> wrote:
> So, I'll get the notification that an app has been launched and it'll
> go in my dock. Then, if a user right-clicks on an app the app's "Dock
> Menu" should pop up.
Hm. Not sure if you can. That may be a private API only Apple knows
the secrets of. I'm not sure though.
> I don't want alternative ways to solve each problem individually
> because I have other uses for getting the NSApplication of a running
> app.
Unfortunately, what Shawn meant by "A little thing called a process
barrier is your way, among other issues." is that, well, you can't.
You won't be able to get an instance of any other applications
NSApplication. Even if all applications were Cocoa and had
NSApplication instances and you were able to figure out the address of
the instance that address would be useless* to your application.
However something like an input manager or SIMBL bundle might
effectively do an end-run around this restriction. Combine one of
those with some IPC, and you go a long way toward getting the kind of
information desired here.
Of course that doesn't mean you can get an NSApplication for an app
that doesn't have one...
--
Tom Harrington
email@hidden
AIM: atomicbird1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden