Re: NSSavePanel and file formats
Re: NSSavePanel and file formats
- Subject: Re: NSSavePanel and file formats
- From: Quincey Morris <email@hidden>
- Date: Mon, 20 Apr 2009 00:51:53 -0700
On Apr 20, 2009, at 00:16, Graham Cox wrote:
The save dialog shows the format pop-up automatically if you declare
in your info.pList that you export multiple types. Presumably it
also takes care of everything else too - you just need to set up the
pList and respond to the type passed to your document's -
daatOfType:error: method which will depend on what the user chose.
Ah, I didn't know that. If I did, I would have mentioned that this is
actually for an Export As... dialog, so that the file types are by
definition not in info.plist.
I did actually get the popup to work via a NSViewController subclass
for an accessory view, and calling setAllowedFileTypes: while the
dialog is displayed works just fine.
But one annoying problem remains. When exporting files (at least in my
case) it's highly desirable for some formats to get a suffix on the
default filename (specifically, because some of the formats require
creating a folder of stuff instead of a file, and an extension on the
folder isn't desirable at all), but there appears to be no way to
change the filename while the dialog is displayed. There's no
setFilename method, and no delegate method that appears to allow the
filename to be changed.
_______________________________________________
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