Make NSOpenPanel open a custom directory

Viewed 4022

is there any way that I can pass a URL to a folder on my system which should be the default window which an NSOpenPanel opens? Thanks!

Update:

NSOpenPanel *ads_open = [[NSOpenPanel openPanel] retain];
[ads_open setDirectoryURL:"file://localhost/System/Library/CoreServices/prndrv"];

I am using the above code which is the directory which I would like to be opened by default. However, the default window that I am getting is still the last one that I have accessed and not the one that I have specified. How can I access the URL directory?

4 Answers
Related