Re: cocoa-dev digest, Vol 1 #761 - 16 msgs
Re: cocoa-dev digest, Vol 1 #761 - 16 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #761 - 16 msgs
- From: Rainer Brockerhoff <email@hidden>
- Date: Wed, 24 Oct 2001 16:25:20 -0200
Date: Tue, 23 Oct 2001 22:35:59 -0700
From: Wakeup <email@hidden>
Subject: Re: Drag and drop-folders
To: email@hidden
I would like to know this also - for Carbon and Coccoa apps.
The X Finder doesn't see to honor the old 'BNDL' resource at all in
Carbon apps.
-m
------------------------------------------------------------------
At 11:45 PM -0400 10/23/01, Peter Ammon wrote:
How can I permit a user to drag and drop folders onto my application
in the Finder and in the Dock? I'm guessing I have to specify
>something in my Info.plist file, but I can't figure out what.
To allow _any_ file, folder or volume to be dragged onto your icon,
put this into your info.plist file (for Cocoa or Carbon bundles) or
'plst' resource (for Carbon app files):
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>NSFilenamesPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
If you're NSDocument-based you also need to point at your NSDocument
subclass here.
For the Finder/Dock to see this, you may have to remove all older
versions of your app before running the new one, and log out/log in
again.
HTH,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)