Re: Reusing the last viewed directory
Re: Reusing the last viewed directory
- Subject: Re: Reusing the last viewed directory
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 11 Jan 2004 15:25:50 -0800
On Jan 11, 2004, at 10:27 AM, Chad Armstrong wrote:
result = [dir_panel runModalForDirectory:NSHomeDirectory() file:nil
types:nil];
Is there any NSSomething() call to retrieve the last directory, AND if
there is no last directory, then it can default to something like the
NSHomeDirectory() (or some other specified directory?
Try this: (disclaimer - written in Mail, untested, use at your own
risk, etc.)
if ([[NSUserDefaults standardUserDefaults]
objectForKey:@"NSDefaultOpenDirectory"])
result = [dir_panel runModalForDirectory:nil file:nil types:nil];
else
result = [dir_panel runModalForDirectory:NSHomeDirectory() file:nil
types:nil];
Nick Zitzmann
<
http://seiryu.home.comcast.net/>
<
http://www.freshlysqueezedsoftware.com/>
S/MIME signature available upon request
UNIX: Where /sbin/init is Job #1.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.