dialog.setcurrent(dialog=NULL, stop.ok=T)
dialog
, as returned by the
dialog.create
function. If
NULL
, the function verifies that there is a current dialog in the
dialog handling system.
T
, this
function uses
stop
to report an error message when the
dialog
is
invalid for some reason. If set to
F
, then
stop
will not execute.
T
if the dialog setting operation (if
requested) was successful and the current dialog is valid.
Several of the standard dialog manipulation functions use this function to
change the current dialog. This is where erroneous references to old dialogs
are trapped. Such references can happen when a call to
dialog.display
is
made using a dialog that has been destroyed or existed in a different
invocation of the dialog handling system.
# Set current dialog to exiting dialog, then post it. dialog.setcurrent(lpr.dialog) dialog.send('dialog post', wait=T) # The "proper" way to do the above. dialog.popup(lpr.dialog)