PDA

View Full Version : NSOpenPanel selection




BollywooD
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:
~/Users/Me/Desktop/samplefile.txt


is this possible?
:confused:



kainjow
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: