Re: allow user to select a directory
Re: allow user to select a directory
- Subject: Re: allow user to select a directory
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 7 May 2007 18:20:28 -0600
On May 7, 2007, at 6:15 PM, Roland Silver wrote:
[[NSOpenPanel openPanel] runModal] only allows the user to select a
file, not a directory.
How to allow the user to select a directory?
Like this: (disclaimer - written in Mail, untested, use at your own
risk, and all that)
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:NO];
[panel setCanChooseDirectories:YES];
[panel runModal];
Did you know about the NSOpenPanel documentation? I found that just
by looking...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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