• 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
NSSavePanel and allowing unknown extensions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSavePanel and allowing unknown extensions


  • Subject: NSSavePanel and allowing unknown extensions
  • From: Ken Baer <email@hidden>
  • Date: Thu, 5 Jul 2007 14:07:41 -0700

I'm having a problem with getting a save dialog to not append the extension on the end the filename when the user types in a different extension. I am using setAllowsOtherFileTypes method, but it doesn't seem to make any difference. I am using the setAllowedFileTypes method so that if the user doesn't type in an extension, the default (.mov in this case) is appended. From everything I've read, it seems that setAllowsOtherFileTypes should do this, but .mov is always appended. Here is some sample code.

	NSSavePanel* saveDialog = [NSSavePanel savePanel];
    [saveDialog setAllowedFileTypes:[NSArray arrayWithObject:@"mov"]];
    [saveDialog setAllowsOtherFileTypes:YES];
	if ([saveDialog runModal] != NSFileHandlingPanelOKButton)
		return NO;

Am I missing something?
Thanks.

-Ken Baer.
BaerCode




_______________________________________________

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


  • Prev by Date: Binding Across Nibs
  • Next by Date: Re: Binding Across Nibs
  • Previous by thread: Re: Binding Across Nibs
  • Next by thread: Re: NSSavePanel and allowing unknown extensions
  • Index(es):
    • Date
    • Thread