Re: movieFileTypes, imageFileTypes and Info.plist's
Re: movieFileTypes, imageFileTypes and Info.plist's
- Subject: Re: movieFileTypes, imageFileTypes and Info.plist's
- From: Mike Abdullah <email@hidden>
- Date: Thu, 16 Jul 2009 23:00:37 +0100
On 16 Jul 2009, at 22:12, Andrew Salamon wrote:
I'm using code something like this to build a list of file types
that my application can read:
NSArray *movieTypes = [[QTMovie movieFileTypes:QTIncludeCommonTypes]
retain];
NSArray *imageTypes = [[NSImage imageFileTypes] retain];
allTypes = [[imageTypes arrayByAddingObjectsFromArray:movieTypes]
retain];
Since I'm using QuickTime and NSImage to convert all of those
formats into my own internal format, my application can handle most
files that QuickTime or NSImage can.
Because I'm using those image type lists in my open panel, users can
open any of those filetypes from within my app. However, users can't
drop image or movie files onto my application, or open them in my
app using the Finder's 'Open With' menu item because my Info.plist
file doesn't list all of them (or any of them, actually).
Are there any options for having the Finder recognize that my app
can read any file QuickTime can? Or do I need to manually maintain a
list of filetypes in my Info.plist?
Pretty certain you do need to this manually. One option could perhaps
be to declare your plist as just accepting public.image and
public.movie though. It would be possible for the user to drop an
unsupported file type, but it would cover everything your above code
does. And presumably it would be fairly rare for someone to drop in a
video format that QuickTime can't handle.
_______________________________________________
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