These convenience functions create a single instance of each of the Motif feedback dialogs. If an instance of the requested type of dialog already exists, then it is reused. The parent of the dialog is obtained from the environment variable $TOPLEVEL, which should be set by the calling shell script, and then should not be changed. The handle for the requested dialog is returned in one of the following environment variables:
_DTKSH_ERROR_DIALOG_HANDLE
_DTKSH_QUESTION_DIALOG_HANDLE
_DTKSH_WORKING_DIALOG_HANDLE
_DTKSH_WARNING_DIALOG_HANDLE
_DTKSH_INFORMATION_DIALOG_HANDLE
If you are attaching your own callbacks to the dialog buttons, do not destroy the dialog when you are done with it. Unmanage the dialog, so that it can be used again at a later time. If it is necessary to destroy the dialog, then be sure to clear the associated environment variable so the convenience function does not attempt to reuse the dialog.
Usage:
DtkshDisplay<name>Dialog title message [okCallback closeCallback helpCallback dialogStyle]
The Ok button is always managed, and by default unmanages the dialog. The Cancel and Help buttons are only managed when a callback is supplied for them. The dialogStyle parameter accepts any of the standard resource settings supported by the associated bulletin board resource.
Example:
DtkshDisplayErrorDialog "Read Error" "Unable to read the file" "OkCallback" \ "CancelCallback" "" DIALOG_PRIMARY_APPLICATION_MODAL