11.28 load()

With this function, a dialog is loaded, but not yet started.

Definition

object load
(
  string Filename input
)

Parameters

string Filename input

In this parameter the file name of the dialog to be loaded is indicated. This indication can be made via the usual mechanism in the IDM

<environment variable>:<filename>

to make the loading process as flexible as possible. The environment variable will be interpreted as path in which the indicated file is to be searched for.

Return value

DialogID
Here the ID of the newly loaded dialog has been returned.
null
The dialog could not be loaded.

Example

Loading a dialog and starting the newly loaded dialog.

variable object Dialog := null;

Dialog := load("SearchPath:Test.dlg");
!! checking whether dialog could be loaded
if Dialog <> null then
  !! starting the dialog
  run (Dialog);
endif

See also

Built-in function run()

C function DM_LoadDialog in manual “C Interface - Functions”