Re: NSSavePanel mishandling extensions
Re: NSSavePanel mishandling extensions
- Subject: Re: NSSavePanel mishandling extensions
- From: Russ <email@hidden>
- Date: Wed, 3 Dec 2008 14:09:41 -0800 (PST)
It works as desired when only a single permissible file extension is involved. (I have setAllowsOtherFileType:NO)
But
the issue is that the user has the option to save jpg, tif, bmp, png
etc files---a specific supported list of types; the popup selects which type will be saved, and the
extension needs to be modified accordingly, immediately if the Show
Extension box is on, and at the very least, later when the filename is
being locked in and the overwrite tests done. Users can change the
desired file type several times when the panel is open. This is a
builtin feature in Windows, btw, it's a bit silly to have to spend my time to reproduce
such a common function. Something like setAllowedFileTypes that takes an NSDictionary of extensions and user-readable equivalents would let NSSavePanel do this all by itself.
You can see somebody else having
problems with this on Mac Firefox, do a File/Save Page As--- you can change the
type, but they aren't updating the extension if you change to text.
----- Original Message ----
Sent: Wednesday, December 3, 2008 4:10:07 PM
Subject: Re: NSSavePanel mishandling extensions
Have you tried:
[savePanel setRequiredFileType:@"txt"];
[savePanel setAllowsOtherFileTypes:YES];
This is what TextEdit does. Does TextEdit work in a way similar to what you want to do?
-corbin
_______________________________________________
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