NSOpenPanel and JPG files
NSOpenPanel and JPG files
- Subject: NSOpenPanel and JPG files
- From: Mary Waller <email@hidden>
- Date: Mon, 26 Apr 2004 13:17:11 +0100
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];
NSOpenPanel * oPanel = [NSOpenPanel openPanel];
int result;
if ([[NSUserDefaults standardUserDefaults]
objectForKey:@"NSDefaultOpenDirectory"]){
result = [oPanel runModalForDirectory:nil file:nil
types:fileTypes];
}
else{
result = [oPanel runModalForDirectory:NSHomeDirectory()
file:nil types:fileTypes];
}
mwaller
_______________________________________________
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.