# File lib/foxtails/FTFileBrowser.rb, line 326
    def on_cmd_delete_files
      # adapted from FXFileSelector::onCmdDelete
      dir = directory
      for item in 0...getNumItems
        if isItemSelected(item)
          name = getItemFilename(item)
          next if name == '..'
          fullname = File.join(dir, name)
          answer = FXMessageBox.warning(self, MBOX_YES_NO_CANCEL,
            "Deleting files",
            "Are you sure you want to delete the file:\n\n#{fullname}")
          case answer
          when MBOX_CLICKED_CANCEL; break
          when MBOX_CLICKED_NO;     next
          end
          begin
            if File.directory?(fullname)
              Dir.rmdir fullname # unlike onCmdDelete, do NOT rm-rf
            else
              File.delete fullname
            end
          rescue => e
            break if MBOX_CLICKED_NO==FXMessageBox.error(self, MBOX_YES_NO,
              "Error Deleting File",
              "Unable to delete file:\n\n#{fullname}\n\n#{e.message}\n\n" +
              "Continue with operation?")
          end
        end
      end
    end