Re: Type/Creator codes for RTFD Documents
Re: Type/Creator codes for RTFD Documents
- Subject: Re: Type/Creator codes for RTFD Documents
- From: Tod Cunningham <email@hidden>
- Date: Thu, 12 Feb 2004 00:06:03 -0500
Good catch, I can't believe I got the type/creator backwards! However,
it still doesn't work. The icon doesn't change, and when double
clicked TextEdit is launched. I tried both the PkgInfo route and the
Info.plist route without any luck. You can see from this that I do an
ls, followed by a cat of PkgInfo, and followed by a cat of Info.plist:
Earth:~/Desktop/Untitled.rtfd/Contents tcunning$ ls
Info.plist PkgInfo
Earth:~/Desktop/Untitled.rtfd/Contents tcunning$ cat PkgInfo
RTFDEntx
Earth:~/Desktop/Untitled.rtfd/Contents tcunning$ cat Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>
<string>RTFD</string>
<key>CFBundleSignature</key>
<string>EntX</string>
</dict>
</plist>
I included a clip of my application's Info.plist so you can see I am
registering the create/type information correctly:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rtf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>EntoPrint Label Icon</string>
<key>CFBundleTypeName</key>
<string>Label</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>RTF0</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>NSDocumentClass</key>
<string>EPDocument</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rtfd</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>EntoPrint Label Icon rtfd</string>
<key>CFBundleTypeName</key>
<string>Label with Images</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>RTFD</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>NSDocumentClass</key>
<string>EPDocument</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>EntX</string>
Has anybody tried this on a rtfd "bundle"?
Thanks,
Tod Cunningham
On Feb 11, 2004, at 1:38 PM, Timothy Carl Buchheim wrote:
On Feb 10, 2004, at 8:25 PM, Tod Cunningham wrote:
Thanks for the quick response, that really looked like the right path
to follow, but I still couldn't get it to work. First I tried adding
the PkgInfo file to the Contents directory. The PkgInfo file was
simple enough, so I used vi to create the file containing "EntXRTFD"
(my document creator & type code). That did work even through a
reboot to try to flush finder cashes.
try "RTFDEntX" .. it's type, then creator.
Same thing with your Info.plist .. the CFBundlePackageType is the
filetype (RTFD) and the CFBundleSignature should be the creator (EntX)
Can these be added manually through a Terminal window or is there
some other flag that I have to set for the OS to pickup these
settings? Any other ideas?
I did it in the Terminal: mkdir foobar.rtfd/Contents; echo "RTFDxcde"
> foobar.rtfd/Contents/PkgInfo
--- Contents of Info.plist ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>
<string>EntX</string>
<key>CFBundleSignature</key>
<string>RTFD</string>
</dict>
</plist>
--
Tim Buchheim System Administrator
Computer Science Department Phone: (909) 607-3485
Harvey Mudd College Fax: (909) 607-8364
1250 N Dartmouth Ave E-mail: email@hidden
Claremont, CA 91711 http://www.cs.hmc.edu/~tcb/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.