createCommand


function createCommand(label:string; commandType:integer; priority:integer): command;

Creates the command element with the label 'label'. The label should be as short as possible. The priority of the command is set with the 'priority' parameter; the lower value means higher priority. The application uses the 'commandType' to specify the intent of this command. For example, if the application specifies that the command is of type CM_BACK, and if the device has a standard of placing the "back" operation on a certain soft-button, the implementation can follow the style of the device by using the semantic information as a guide. 'commandType' can be any of the following:

  var exitCmd, pauseCmd: command;
  begin
    exitCmd := createCommand('Exit', CM_EXIT, 1);
    pauseCmd := createCommand('Pause', CM_SCREEN, 1);
    addCommand(exitCmd);
    addCommand(pauseCmd);
  end.

See also: getClickedCommand, addCommand, removeCommand