• 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: Two questions about cocoa programming...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two questions about cocoa programming...


  • Subject: Re: Two questions about cocoa programming...
  • From: Graham Cox <email@hidden>
  • Date: Tue, 30 Sep 2008 02:00:55 +1000


On 29 Sep 2008, at 2:44 am, Leopard x86 wrote:

2. Using openPanel function: how can we memorize the most recent opened directory?
As the question says, we often the open panel directive to open file, is there some method to guarantee that we can be the same location which is opened last time?


By default, the panel always opens at the same directory it was last set to.

If however, you mean remember this between launches of your app, then just save the path returned by the panel, stripping off the last path element, then pass this back in the path: parameter of - beginForDirectory:, etc. The same applies if you use the open panel in several places and want each use to set a different directory depending on the context in your app.

hth,

Graham
_______________________________________________

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


References: 
 >Two questions about cocoa programming... (From: Leopard x86 <email@hidden>)

  • Prev by Date: Re: IBAction deselects currently selected Core Data record?
  • Next by Date: Re: Mouse events with higher priority then repeating NSTimer
  • Previous by thread: Re: Two questions about cocoa programming...
  • Next by thread: Load launchd job immediately, without restart - how?
  • Index(es):
    • Date
    • Thread