Re: Two questions about cocoa programming...
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