I figured it out by adding

<key>CFBundleDocumentTypes</key>
        <array>
                <dict>
                        <key>CFBundleTypeExtensions</key>
                        <array>
                                <string>****</string>
                        </array>
                        <key>CFBundleTypeName</key>
                        <string>DocumentType</string>
                        <key>CFBundleTypeOSTypes</key>
                        <array>
                                <string>****</string>
                        </array>
                        <key>CFBundleTypeRole</key>
                        <string>Editor</string>
                </dict>
        </array>

in Info.plist

Thanks!

Jacob Kolding
[EMAIL PROTECTED]





On Jul 26, 2008, at 3:42 AM, Ken Thomases wrote:

On Jul 25, 2008, at 6:51 PM, Jacob Ole Juul Kolding wrote:

I been searching for quite a while and reading the source code for DockScript by still no luck. Can anyone tell me how to make an Cocoa app launch when a file is drag 'n droped on it's icon?

Well, it does so by default -- if the drop is permitted. The Dock decides if the drop is permitted based on the document types that the application claims to handle in its Info.plist file.

http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigApplications.html
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.html

By the way, you can force the Dock to accept the drop, regardless of the claimed document types, by holding down Command and Option.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to