SYNTAX

    dialog [options] [<body>]


OPTIONS

-h (--help) bool

Display help.

-t (--title) string

The title of the dialog. If not specified, defaults to "Attention".

-f (--first-button) string

The text for the first button.

-s (--second-button) string

The text for the first button.

-m (--mode) enum

Specify the way in which the dialog is displayed. If not specified the default is "notifier".

notifier

The RNotifier API will be used. The behaviour of RNotifier depends on the handset configuration, but normally it will result in a graphical dialog being displayed.

console

The user will be interacted with via the console that the dialog command is connected to. In this mode, pressing the enter (or on some platforms, select) key corresponds to pressing the first button and any other input corresponds to pressing the second button.

null

The dialog is not shown to the user and it is assumed that the first button is always pressed. This mode allows all user interaction to be disabled.

 I<Can also be specified by defining the environment variable 'DIALOG_IMPL'.>


ARGUMENTS

[<body>]

The body of the dialog. If not specified, the body is read from stdin. [string]


DESCRIPTION

Displays a UI dialog.

Up to two buttons are supported. If neither --first-button or --second-button are specified, two buttons are shown, OK and Cancel. The button the user selected can be determined by the return code of the command. The first button will produce a return code of zero (0), and the second a code of one (1). If there was an error displaying the dialog, the error code will be returned (always a negative number). The return code makes it possible to write scripts like:

  dialog "Do you want to proceed?" && do_something

This will result in do_something only being executed if the user presses the first button. An error or the user pressing the second button with NOT result in do_something being executed. Note that killing a dialog command while it is running will usually result in the device crashing or hanging, to prevent this the dialog command traps the CTRL-C key combination.


COPYRIGHT

Copyright (c) 2006-2010 Accenture. All rights reserved.