Re: enumerating the NSApplication instances?
Re: enumerating the NSApplication instances?
- Subject: Re: enumerating the NSApplication instances?
- From: Charles Steinman <email@hidden>
- Date: Thu, 23 Oct 2008 11:47:37 -0700 (PDT)
--- On Thu, 10/23/08, Bill Janssen <email@hidden> wrote:
> Hi. I'm trying to write a simple Cocoa program to
> enumerate the
> windows on the screen, across all the apps. I can see how
> to use
> NSWorkspace.launchedApplications() to enumerate the apps,
> but I don't
> see how to go from those dictionaries to an instance of
> NSApplication,
> so that I can enumerate the application's windows.
>
> I'm sure this is perfectly simple, but I'm just not
> seeing it...
You can't get NSApplication instances for other applications. If you want get a list of all the windows on the system, take a look at CGWindow.h in Leopard. The CGWindowList* family of functions do what you want.
Cheers,
Chuck
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden