Re: Need list of apps that can open file type
Re: Need list of apps that can open file type
- Subject: Re: Need list of apps that can open file type
- From: David Duncan <email@hidden>
- Date: Fri, 9 Feb 2007 10:55:29 -0800
On Feb 9, 2007, at 10:14 AM, Ted Leckie wrote:
I need a way to get the list of apps that can open a certain file
type, say pdf, just like the Finder shows in its Get Info dialog
for a file with its "Open With" popup. I see that
LSCopyAllRoleHandlersForContentType will give me a list of UTIs for
apps that can open files of certain types but I don't understand
how to get the application names from a UTI. Also the Finder "Open
With..." popup shows all versions of an app that can open PDFs, so
for example, Safari (2.0.4) and Safari (3.0). Any help would be
much appreciated, thanks.
That API doesn't give you UTIs to the applications (UTIs represent
data types not applications) but bundle identifiers for applications
that can handle the given UTI. You can use LSFindApplicationForInfo()
to get a URL to the application and then an LSOpen* api to launch the
application.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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