• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reusing the last viewed directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Reusing the last viewed directory (From: Chad Armstrong <email@hidden>)

  • Prev by Date: LoginItemAPI
  • Next by Date: Re: Aaron's Chapter 5 TableView Example
  • Previous by thread: Reusing the last viewed directory
  • Next by thread: Re: Reusing the last viewed directory
  • Index(es):
    • Date
    • Thread