OWBasic Standard Library

Group MEMO Home INTRO Alphabetical Index

Memo Selection Dialogue

M_SELECT!(filtermode% [, filter$=""] [, cat%])

This function provides a dialogue for the selection of a memo file. If cat is given, the category is used as default category, otherwise a memo category selection dialogue ( M_SELCAT) is shown.
The following constants can be used for filtermode:
#M_ALLall memo files
#M_ENDonly memo files which have the given file extension
#M_SIGonly memo files which have the given file signature

File extensions are the last four characters of the file name, including the dot as first character (f.e. ".iff"). File signatures are the first two characters of the filename, for example "! ", "!+" or "!*". The file extension or signature to be used must be given as filter parameter. If you want to use multiple file extensions or signatures, just append them.
To create an user-defined filter, it is possible to assign the pointer to a function with the return value type bool and no parameters to the global variable m_check as shown in the example:
! memodemo


FUNC checkfunc!
RETURN POS('r', m_name, FALSE) :! only memos whose file name contains 'r' or 'R'

m_select!(#M_SIG, "! !+!*") :! memos with the signature "! ", "!+" or "!*" only

PRINT m_name, m_cat, m_fp

The filepointer of the selected memo is stored to m_fp, the file name to m_name and the category to m_cat. If the user selected a memo file, the function returns true, false otherwise.

  • M_SELCAT - Memo Category Selection Dialogue
Gruoup MEMO Home INTRO Alphabetical Index