Re: Setting the "Open with" attribute on a file
Re: Setting the "Open with" attribute on a file
- Subject: Re: Setting the "Open with" attribute on a file
- From: "Sean McBride" <email@hidden>
- Date: Fri, 3 Jun 2005 12:17:07 -0400
- Organization: Rogue Research
On 2005-06-02 20:47, Michael Rothwell said:
>I peeked in the resource fork for a file that I set to open with VLC,
>and the string /Applications/VLC.App appears in there. So, it seems
>that I need to write a resource to a file's resource fork to set it
>to open in VLC by default.
Interesting, I tried and I see the same behaviour. Looks like Finder/
Launch Services adds a 'usro' and custom icon resource when you change
the 'open with' application. The 'usro' resource seems to keep the path
to the app you choose. But I STRONGLY discourage you from relying on
this mechanism for many reasons 1) Apple has not documented it 2) its
likely to change as UTIs take over 3) paths are fragile (how do you know
where your users keep VLC?)
Setting the file's creator to 'VLC#' works. And this is precisely the
purpose of the creator code.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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