Reference MWAPI

The MWAPI introduces special variables and functions to the M language for working with the unique properties of GUI applications. These new capabilities are explained in this chapter, along with a sample program to demonstrate their use. MWAPI special variables are covered in the Special Variables section. The new functions return information regarding the current font, and are covered in the Functions section. A sample program using a modified version of the Table gadget presented in Chapter 5 is used in the Implementation section to demonstrate the functions and special variables introduced in this chapter.
This section covers the special variables available to an M process running a conforming implementation of the MWAPI. $ECODE and $ETRAP are part of the 1995 ANSI M standard, and are included here to help clarify MWAPI error processing.
| $ER[EF] | When an error occurs because of an MWAPI SSVN node, $ER will contain the reference. This is true no matter whether the error is due to a display, an entity or an element. This variable is demonstrated in the Implementation section. |
| $EC[ODE] | $EC is a special variable name (SVN) that contains a comma delineated string of error codes. The comma character is the first character in the string of error codes and the last character in the string. When a process is activated, the value of $EC equals the emptystring. Program execution continues normally until a value (or values) is assigned to this variable. Application code can modify the value of this... |