## Tcl9.0.3/Tk9.0.3 Documentation > Tk Commands > tkwait

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

### NAME

tkwait — 変数が変化するか部品が破壊されるまで待つ Wait for variable to change or window to be destroyed

### SYNOPSIS

tkwait variable name
tkwait visibility name
tkwait window name

### 説明 DESCRIPTION

この命令は幾つかの内の一つが生じるのを待つ､次いで､何もすることなく戻る｡返る値は空文字列である｡もし､第１引数が variable (又は､その短縮形)であると､第２引数は大域変数の名前であり､この命令は変数が修正されることを待つ｡もし最初の変数が visibility (又は､その短縮形)であると､第２引数は窓であり､この tkwait 命令はその可視状態の変更を待つ( VisibilityNotify 行事の到着によって指し示すこととして)｡この形式は典型的には､何かの動作をとる前に新しく作成された窓が画面に現れるのを待つことに使われる｡もし最初の変数が window (又は､その短縮形)であると､第２引数は窓であり､この tkwait 命令はその窓が破壊されるのを待つ｡この形式は典型的には､対話の結果を使う前に使用者が対話箱を使って相互作用を終えるのを待つことに使われる｡ The tkwait command waits for one of several things to happen, then it returns without taking any other actions. The return value is always an empty string. If the first argument is variable (or any abbreviation of it) then the second argument is the name of a global variable and the command waits for that variable to be modified. If the first argument is visibility (or any abbreviation of it) then the second argument is the name of a window and the tkwait command waits for a change in its 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. If the first argument is window (or any abbreviation of it) then the second argument is the name of a window and the tkwait command waits for that window 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.

tkwait 命令が待つ間､行事を通常の方式で処理する､そこで､応用譜は使用者との相互作用に応答し続ける｡もし行事処理機能が再度 tkwait を起動すると､入れ子になった tkwait が外側の呼出が完了可能になるまでに完了されなければならない｡ While the tkwait command is waiting it processes events in the normal fashion, so the application will continue to respond to user interactions. If an event handler invokes tkwait again, the nested call to tkwait must complete before the outer call can complete.

### SEE ALSO

bind, vwait

### KEYWORDS

variable, visibility, wait, window
Copyright © 1992 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.