• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSOpenPanel and JPG files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSOpenPanel and JPG files
      • From: Nicko van Someren <email@hidden>
  • Prev by Date: KeyValue Observing rant
  • Next by Date: Dowload
  • Previous by thread: Re: KeyValue Observing rant
  • Next by thread: Re: NSOpenPanel and JPG files
  • Index(es):
    • Date
    • Thread