The OpenD Programming Language

FileName

Used in automatic menu functions to indicate that the user should be able to browse for a file.

struct FileName (
string[] filters = null
FileDialogType type = FileDialogType.Automatic
) {
string name;
}

Alias This

name

Parameters

storage

an alias to a static string variable that stores the last file referenced. It will use this to pre-fill the dialog with a suggestion.

Please note that it MUST be static or you will get compile errors.

filters

the filters param to getFileName

type

the type if dialog to show. If FileDialogType.Automatic, it the driver code will guess based on the function name. If it has the word "Save" or "Export" in it, it will show a save dialog box. Otherwise, it will show an open dialog box.

Meta