Wait for variable to change or window to be destroyed

## NAME

waitOption - Wait for variable to change or window to be destroyed

## SYNOPSIS

$widget->waitVariable(\$name)
$widget->waitVisibility
$widget->waitWindow

## DESCRIPTION

The tk wait methods wait for one of several things to happen, then it returns without taking any other actions. The return value is always an empty string. waitVariable expects a reference to a perl variable and the command waits for that variable to be modified. This form is typically used to wait for a user to finish interacting with a dialog which sets the variable as part (possibly final) part of the interaction. waitVisibility waits for a change in $widget's visibility state (as indicated by the arrival of a VisibilityNotify event). This form is typically used to wait for a newly-created window to appear on the screen before taking some action. waitWindow waits for $widget to be destroyed. This form is typically used to wait for a user to finish interacting with a dialog box before using the result of that interaction. Note that creating and destroying the window each time a dialog is required makes code modular but imposes overhead which can be avoided by withdrawing the window instead and using waitVisibility.

While the tk wait methods are waiting they processes events in the normal fashion, so the application will continue to respond to user interactions.

## KEYWORDS

variable, visibility, wait, window