Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying initial directory for NSOpenPanel RunModal?

Seems like I must be overlooking something in documentation.

How do I specify a directory I want to start in when I use runModal with NSOpenPanel.

Some methods are deprecated in 10.6.

like image 203
terratactile Avatar asked May 28 '11 18:05

terratactile


1 Answers

You set this using setDirectoryURL before displaying the panel with beginSheetModalForWindow:completionHandler:

It's specified in the documentation. NSOpenPanel subclasses NSSavePanel so you can use those methods as well.

like image 157
Abizern Avatar answered Oct 12 '22 15:10

Abizern