Re: NSOpenPanel and JPG files
Re: NSOpenPanel and JPG files
- Subject: Re: NSOpenPanel and JPG files
- From: Nicko van Someren <email@hidden>
- Date: Mon, 26 Apr 2004 14:29:59 +0100
On 26 Apr 2004, at 13:17, Mary Waller wrote:
I can't get an NSOpenPanel to allow me to select .JPG files, although
all the other types I specify are OK.
What am I doing wrong? (OS X 10.28 and OS X 10.3)
NSArray *fileTypes = [NSArray
arrayWithObjects:@"jpg",@"JPG",@"png",@"bmp",@"tif", nil];
Looking at the values in the list coming back from [NSImage
imageFileTypes] you might want to add, "jpeg", "JPEG" and "'JPEG'". I
think that last one has something to do with the file type being set in
the old fashioned manner rather than with a file name extension.
Alternatively, if you simply want to be able to load all sorts of image
you can just use the value returned by [NSImage imageFileTypes] rather
than building your own array.
Cheers,
Nicko
_______________________________________________
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.