View Full Version : NSOpenPanel selection

May 24, 2010, 11:18 PM
I have an NSOpenPanel, all working as it should, but I would like to be able to ignore selection, for a specific file.

ie, I want to be able to select all files of the type "txt" but not the file:

is this possible?

May 24, 2010, 11:42 PM
You can implement the delegate method panel:shouldEnableURL: to disable a file from being selected. If you need pre-10.6 compatibility you can also use panel:shouldShowFilename: