FILTER

FILTER N, T

SET THE FILTER T APPLIED BY THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameters: 2
  • Group: System Objects

ACTION

The command FILTER N,T set the filter applied by the system object designated by its number N.

The system object is an OPEN_DIALOG, SAVE_DIALOG, OPEN_DIALOG_PIC, SAVE_DIALOG_PIC.

The filter T is composed of a type of file to be filtered after a comment. To define several types of files, the types must be separated by ";". Per example: filter 2,"sound files|*.wav;*.mp3"

SYNTAX: FILTER N,T

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • T = filter to be applied to the system object: "comment|file.extension" or "comment|file.extension1;file.extension2;file.extension3"

USE

  • The command FILTER is used to filter types of file with an OPEN_DIALOG, SAVE_DIALOG, OPEN_DIALOG_PIC, SAVE_DIALOG_PIC.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If system object number N is not of the type : OPEN_DIALOG, SAVE_DIALOG, OPEN_DIALOG_PIC, SAVE_DIALOG_PIC.
  • If text T is not a correct expression.

EXAMPLE

rem create an OPEN_DIALOG

open_dialog 1

rem filter sound files (wav) and display a comment

filter 1,"sound files|*.wav"

rem create a SAVE_DIALOG

save_dialog 1

rem filter sound files (wav and mp3) and display a comment

filter 2,"sound files|*.wav;*.mp3"

SEE ALSO

OPEN_DIALOG

SAVE_DIALOG

OPEN_DIALOG_PIC

SAVE_DIALOG_PIC

FILE_DIALOG

FILE_NAME$()

DIR_DIALOG