• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting the "Open with" attribute on a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Setting the "Open with" attribute on a file
      • From: Finlay Dobbie <email@hidden>
References: 
 >Setting the "Open with" attribute on a file (From: Michael Rothwell <email@hidden>)
 >Re: Setting the "Open with" attribute on a file (From: "Sean McBride" <email@hidden>)
 >Re: Setting the "Open with" attribute on a file (From: Michael Rothwell <email@hidden>)

  • Prev by Date: Re: NSTableView - need something like tableView:shouldSelectRow:byExtendingSelection:?
  • Next by Date: Accepting image drags from Safari & Firefox
  • Previous by thread: Re: Setting the "Open with" attribute on a file
  • Next by thread: Re: Setting the "Open with" attribute on a file
  • Index(es):
    • Date
    • Thread