On Wed, 17 Mar 2010 13:40:35 +0530, Nikhil Khandelwal
<nikhil_khandel...@persistent.co.in> 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 = m...@tidbits.com, <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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to