Re: File types opened by NSDocument architecture
Re: File types opened by NSDocument architecture
- Subject: Re: File types opened by NSDocument architecture
- From: Heinrich Giesen <email@hidden>
- Date: Tue, 22 Jul 2008 11:56:41 +0200
On 22.07.2008, at 09:50, Tom Bernard wrote:
/*
+ (NSArray *)readableTypes
{
return [NSArray arrayWithObjects:@"TIFF", @"tiff", @"TIF", @"tif",
@"GIF", @"gif", @"JPEG", @"jpeg", @"JPG", @"jpg", @"png", nil];
}
*/
My application needs to open the above listed file types. When I am in
Finder and I drag and drop one one of these files to my
application, the
file opens. When I choose 'Open...' from my application's 'File'
menu, only
.tif and .psd files are selectable in the open dialog.
Big misunderstanding; with readableTypes you have to return:
<doc> An array of NSString objects representing the readable
document types. </doc>
*document types* not *file/image types*
In your info.plist you define 2 doctypes "Adobe Photoshop file" and
"Large Image Viewer GIF Document" wich are responsible for files with
the extensions "psd" and "gif".
Create in Xcode (info -> Properties) another doctype which has as
CFBundleTypeExtensions a blank (?) separated list of the above image
types.
Heinrich
--
Heinrich Giesen
email@hidden
_______________________________________________
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