From: Michael K. <mi...@mu...> - 2005-02-19 13:17:01
|
So, I'm implementing file assocations in the Info.plist file for my application. I've got ::tk::mac::OpenDocument defined and it works okay, but there are some document types I haven't listed as being supported yet. This isn't really a Tcl/Tk question, so much as a general MacOS X app question, but hopefully someone here knows the answer. The thing is, aside from opening files with extensions .mib, .mi2, .my, .pib and .mip which are unlikely to be anything but MIB/PIB modules and MIB Smithy project files, it can also open/save XML files with a particular schema, or .txt files from RFCs with MIB/PIB modules in them (which it extracts). I'm sure adding these extensions just like the others would be fine for my application, but I'm wondering what consequence this would have for other applications. The mac seems to Just Know since I put the stuff into my application's Info.plist file that if I double-click on a .mib file it can open it in MIB Smithy (as opposed to explicitly setting a system-wide file association a la Windows). This makes me worried a bit. How does it decide which application to use, if multiple applications claim to support the same file extension? If I say MIB Smithy can import .txt files, say, what keeps the Finder from always trying to launch MIB Smithy (instead of, say, TextEditor) whenever someone double-clicks a .txt file? Ideally a user should be able to drop a .txt file or .xml file on the application's icon in the finder like they can with .mib etc. files, but if they double-click such a file it should not assume MIB Smithy can handle it or that MIB Smithy is a better choice in those cases, since it's only a subset of those it can read. -- Michael Kirkham www.muonics.com |