NSOpenPanel selection

Discussion in 'Mac Programming' started by BollywooD, May 24, 2010.

  1. macrumors 6502

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #1
    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:
     
  2. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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:
     

Share This Page