• 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: allow user to select a directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: allow user to select a directory
      • From: Ricky Sharp <email@hidden>
References: 
 >allow user to select a directory (From: Roland Silver <email@hidden>)

  • Prev by Date: allow user to select a directory
  • Next by Date: Re: allow user to select a directory
  • Previous by thread: allow user to select a directory
  • Next by thread: Re: allow user to select a directory
  • Index(es):
    • Date
    • Thread