Re: Using NSSavePanel to export to UTTypeFolder without a file extension.
Re: Using NSSavePanel to export to UTTypeFolder without a file extension.
- Subject: Re: Using NSSavePanel to export to UTTypeFolder without a file extension.
- From: Quincey Morris <email@hidden>
- Date: Thu, 17 Jan 2013 15:22:21 -0800
On Jan 17, 2013, at 14:12 , Thomas Bunch <email@hidden> wrote:
> Launch, take your "document" (very much a stub), File -> Export…, "My Flat Format". Now File -> Export… again but this time pick "My HTML Folder Export". If you have your file extensions visible you'll see at this point that the extension is ".mff". Even so, the typical user will blow away their document at this point without a second thought.
Can't you detect this situation in the save code itself? If you're actually replacing a file with a folder, at least if file extensions were hidden when the save panel closed, you might want to abort the save. If you're replacing a folder with a folder … well, you'd have to decide if it's important that the existing folder has an extension, or doesn't appear to be the kind of folder contents you're replacing it with.
Or, just look at the UTI for what you're replacing. If it's something your app recognizes, you might want to avoid replacing it with a generic folder.
_______________________________________________
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