Setting Document Associations With OS X (was Re: Help with setRegistry?)
kray at sonsothunder.com
Fri Aug 2 10:55:01 CDT 2002
OK, I'm back. :-)
Here's what you need to do in OS X... I'm assuming a creator code of "STS1"
and an extension of "sts" - remember the original app was called "TestAE":
1) Create your standalone (in my case it was "TestAE.app").
2) Find your standalone in the Finder, control-click it and choose "Show
3) In the folder that opens, open the folder called "Contents".
4) In the Contents folder, double-click on "PkgInfo". It will launch
TextEdit and it should contain the simple string "APPLMCRD". Change this to
"APPLSTS1", save the file.
5) The next step is to edit the "Info.plist" file; if you installed the
Developer Tools that came with OS X, you will have an application called
"PropertyList Editor" on your hard drive, which provides a UI for editing
this file. If not, you can edit it in TextEdit, but you'll be manipulating
XML. I've outlined both ways below:
If you have PropertyList Editor:
5a) Quit out of TextEdit (since you won't need it).
5b) Double-click "Info.plist", which will launch Property Editor.
5c) Expand "Root".
5d) Change the "CFBundleSignature" to "STS1".
5e) Expand "CFBundleDocumentTypes", then expand "0".
5f) Change "CFBundleTypeName" to a name you want your document to show in
the Finder. I've changed mine to "TestAE document".
5f) Expand "CFBundleTypeExtensions".
5g) Change the value for "0" from "mc" to "sts".
5h) Save changes and quit the PropertyList Editor.
If you don't have PropertyList Editor:
5a) With TextEdit still open, open the file "Info.plist".
5b) Under the root level <dict>, find the subelement <array>, then the
subelement of <array> called <dict>, then the subelement of <dict> called
<array>, then the subelement of <array> called <string> that contains the
value "mc". (For the purposes of the rest of this email, paths will be
referred to using backslahes, so this location in the XML document would be
5c) Change the value from "mc" to "sts"
5d) Locate the \dict\array\dict\key with the value "CFBundleTypeName".
Underneath that is a <string>. Change its value from "Metacard stack" to
5e) Locate the \dict\key with the value "CFBundleSignature". Underneath that
is a <string>. Change its value from "MCRD" to "STS1".
5f) Save changes and quit TextEdit.
Note that in either case you can change other data (such as copyright info
("NSHumanReadableCopyright"), version strings ("CFBundleShortVersionString",
"CFBundleLongVersionString") and the like, but for right now, that wasn't
6) Create your test stack, adding a ".sts" extension (mine was called
Now comes the important part -- reboot *twice*. Perhaps its the way I did
things (create the dummy stack with the ".sts" extension first and then
tweak the settings of TestAE.app), but I found that if I rebooted once, the
dummy stack I'd created did not associate properly with TestAE.app. I didn't
have time to test this, so I'd be interested in your feedback.
BTW: You'll know if the association works if the "Kind" column in the Finder
shows "TestAE document" and not "Document" or "Metacard stack".
One final note: You can change the icons that your standalone uses for
documents by downloading an icon editor for OS X (I tried a cheap one called
Icon Machine III), and opening the file "MetaCardDoc.icns" in the Resources
folder of the Contents folder. I would assume that for professionally
shipping applications you could change the names of the '.icns' files, so
long as you changed the references in the Info.plist file
Hope this works for you; please report back to the list and let us know if
these instructions are sound. If they are, I'll formalize them and put them
as a Tip on my site that anyone can access as needed.
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Ken Ray" <kray at sonsothunder.com>
To: <use-revolution at lists.runrev.com>
Sent: Thursday, August 01, 2002 7:06 PM
Subject: Re: Help with setRegistry?
> Ah... that's the issue. I was testing in OS 9 (9.2 to be exact); I'll see
> what can be done in OS X and get back to you soon (unless someone else
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> ----- Original Message -----
> From: "Troy Rollins" <troy at rpsystems.net>
> To: <use-revolution at lists.runrev.com>
> Sent: Thursday, August 01, 2002 5:16 PM
> Subject: Re: Help with setRegistry?
> > On Thursday, August 1, 2002, at 05:47 PM, Ken Ray wrote:
> > >
> > > Can you try something like this and see what you get?
> > Ken,
> > We do appreciate your continued assistance. If I could ask, what Mac OS
> > version are you testing under? So far, we have had no luck in getting
> > applications to open their documents by double-clicking the document in
> > OSX, or by drag and drop operations. We will definitely follow the steps
> > you have outlined, and let you and the list know the results. Is there
> > any need to edit any of the application's resources outside of setting
> > values in Rev? I have taken a look at using a resource editor to see if
> > anything is amiss, but of course, ResEdit is showing its age (badly),
> > and anything edited there then thinks it is a classic application.
> > This step is literally the last step in a fairly ambitious project for
> > Eric and I, and I can't believe we have spent about a week trying to get
> > files to properly open on all platforms. We had thought that was going
> > to be the easy part!!
> > Thanks.
> > --
> > Troy
> > RPSystems, LTD
> > www.rpsystems.net
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the use-livecode