NSSavePanel and allowing unknown extensions
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