Re: Directory to save file in NSSavePanel
Re: Directory to save file in NSSavePanel
- Subject: Re: Directory to save file in NSSavePanel
- From: Matt Neuburg <email@hidden>
- Date: Wed, 17 Mar 2010 09:39:11 -0700
- Thread-topic: Directory to save file in NSSavePanel
On Wed, 17 Mar 2010 13:40:35 +0530, Nikhil Khandelwal
<email@hidden> said:
> I am using NSSavePanel in my application. I am using "runModal" on this to
> show the save panel. The default location it shows to save the file is
> "Desktop" which I want to change to "Document". I tried "runModalForDirectory"
> as well however it uses the given file path as save location always. Basically
> I want NSSavePanel to use "Documents" as default save location and if user
> change the location while saving the file, next time NSSavePanel should shows
> the changed location to save the file.
If you're willing to be Snow Leopard only, a combination of directoryURL and
setDirectoryURL might work. It's a little tricky otherwise because Mac OS X
does automatically remember the last place the user saved, so the idea is to
stay out of its way in that case. That info is kept in your user defaults so
you might be able to examine it. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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