change in launch services binding behavior?
change in launch services binding behavior?
- Subject: change in launch services binding behavior?
- From: Matt Neuburg <email@hidden>
- Date: Thu, 03 Sep 2009 09:46:46 -0700
- Thread-topic: change in launch services binding behavior?
I wonder whether someone (preferably from Apple) could provide details on
how Snow Leopard has changed its algorithm for how a document is bound to an
application, esp. when double-clicking the doc in the Finder.
In the past, where many apps could claim a file type / extension, such as
plain text / .txt, an app could say, "Yes, but this particular file is still
mine" by attaching its creator code to the file. BBEdit does this, for
example, when you use it to create a new .txt file. So that file, although
it is .txt, has BBEdit's icon and opens with BBEdit when double-clicked.
In Snow Leopard that is no longer true. The user can of course specify (with
Get Info in the Finder) that this file opens with BBEdit, but the app itself
appears to be powerless to do the same thing.
The last word on the subject is in a fairly old document on Launch Services:
> Preferred Application for a Document
> For individual document files (whether specified by a file-system reference or
> a URL with scheme file), the criteria are as follows:
>
> If the user has specified an explicit binding for the document (or for the
> entire document type to which it belongs), the preferred application is the
> one the user has specified.
> If the document has a filename extension (or if one has been specified as a
> parameter to LSGetApplicationForInfo), find all applications in the Launch
> Services database that claim to accept documents with that extension.
> If the document carries a four-character file type (or if one has been
> specified as a parameter), find all applications that claim to accept files of
> that type.
> If more than one application has been found as a result of steps 23, apply
> the following criteria in the order shown:
> If the document carries a four-character creator signature (or if one has been
> specified as a parameter), give preference to any application that claims to
> accept documents with that signature (typically the application to which the
> signature belongs).
[etc.]
That sounds like it means: If there's an extension it has priority, but if
there's a conflict for that extension (more than one app has been found that
claims .txt) then give priority to the app whose creator code is the doc's
creator code. And indeed, that is how LS behaved in Leopard.
But in Snow Leopard, it doesn't. Yet the documentation has not been changed;
indeed, there are no Snow Leopard release notes for Launch Services. So
what's going on exactly?
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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