Re: (Newb question?) Launching app on dock icon file drop?
Re: (Newb question?) Launching app on dock icon file drop?
- Subject: Re: (Newb question?) Launching app on dock icon file drop?
- From: Jacob Ole Juul Kolding <email@hidden>
- Date: Sat, 26 Jul 2008 15:10:23 +0200
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@hidden
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 (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