An action expression can access the variables shown in the following table, indicate which tile was selected, and describe the tile's state at the time of the action. The variable names are reserved. Their values are read-only and have no meaning, unless they are accessed within an action expression.
If edit1 is a text box, the action expression in the following action_tile call is evaluated when the user exits the text box:
(action_tile "edit1" "(setq ns $value)")
The $value contains the string that the user entered, and the expression saves this in the ns variable.
The next example saves the name of the selected tile so that the program can refer to it:
(action_tile "edit1" "(setq newtile $key)")
The newtile variable is set to the key name of the selected tile, in this case "edit1". The $key variable is very useful within a function that serves as the action for several separate tiles.
When a tile is named in more than one action_tile call, only the last such call (prior to start_dialog) has any effect. (It's as if you were to assign multiple values to the same variable.) The programmable dialog box (PDB) feature allows only one action per tile.