On May 10, 2006, at 10:00 AM, Jean-Marc Lasgouttes wrote:

"Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes:

Bennett> I'm not sure what you mean: APIs for checking whether a
Bennett> viewer/editor exists for a given file type? Is this what you
Bennett> want?

No, rather LSGetApplicationForInfo
http://developer.apple.com/documentation/Carbon/Reference/ LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/ LSGetApplicationForInfo

Bennett> In the terminal, a simple "open" command uses
Bennett> LSOpenFromURLSpec, returning an error if there's no default
Bennett> viewer/editor.

I guess we should use this one for opening:

http://developer.apple.com/documentation/Carbon/Reference/ LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/ LSOpenItemsWithRole

Note that this latter one is for MacOS 10.4 and later only. For now, it should probably be LSOpenFSRef:

<http://developer.apple.com/documentation/Carbon/Reference/ LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/ LSOpenFSRef>

Bennett

Reply via email to