Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i use NSSavePanel to select a directory?

I need the user select an existing or a new directory where my app can save a few files.

Can i do this with NSSavePanel or is there another directory selector class?

like image 740
Lothar Avatar asked Aug 03 '10 11:08

Lothar


1 Answers

NSSavePanel doesn't give the ability to choose folders but NSOpenPanel (a subclass of NSSavePanel) does. You set YES for -setCanChooseDirectories: and -setCanCreateDirectories:, set a prompt that makes sense with -setPrompt:.

like image 79
Joshua Nozzi Avatar answered Oct 15 '22 14:10

Joshua Nozzi