On Jun 21, 2006, at 11:04 AM, John Kubie wrote:

I would like to have a double-clickable document that will launch my application and be opened.

The difficulty is that my 'documents' are folders containing images, text files, etc.

The solution (for OS X) seems to be making the document folders into packages (bundles) that have an extension linked to the application.

My questions:

1. what is needed to make a folder a bundle? A bundle associated with a particular application? I've read some of Apple's documentation, and, in my first attempt at modifying the info.plist in the application and giving a matching extension to the folder, nothing happened to the folder; it stayed a folder. I'm assuming that the extension must be registered by the finder, but I don't know when the finder reads the info.plist. Also, I'm probably doing other stuff wrong.

I think that your application needs to register the document bundle type. If you open TextEdit's Info.plist file you'll see stuff like the following.

                <dict>
                        <key>CFBundleTypeExtensions</key>
                        <array>
                                <string>rtfd</string>
                        </array>
                        <key>CFBundleTypeIconFile</key>
                        <string>rtfd.icns</string>
                        <key>CFBundleTypeName</key>
                        <string>NSRTFDPboardType</string>
                        <key>CFBundleTypeRole</key>
                        <string>Editor</string>
                        <key>LSIsAppleDefaultForType</key>
                        <true/>
                        <key>LSTypeIsPackage</key>
                        <true/>
                </dict>


This is the sort of thing you'll need to add to your application's Info.plist file. REALbasic does not provide a way to do this, so you'll need to edit Info.plist yourself. I suggest creating an Info.plist file. Then each time you compile, replace the file created by Rb with a copy of your file.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to