Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BollywooD

macrumors 6502
Original poster
Apr 27, 2005
369
46
Hamburg
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

Moderator emeritus
Jun 15, 2000
7,958
7
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:
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.