tkwait(n)
π tkwait(n) β Tk Built-In Commands, but make it group-chat π
okay bestie, welcome to the tkwait page from the Tk Built-In Commands manual. this command is literally the βwait for itβ¦β of Tk: it hangs out until one specific thing happens, then returns. no extra actions, no drama. β¨
π NAME π
tkwait β wait for variable to change or window to be destroyed. thatβs the whole assignment, and it ate. π
β¨ SYNOPSIS β¨
tkwait variable name
tkwait visibility name
tkwait window name
πΈ DESCRIPTION πΈ
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. π«§
Hereβs the vibe check on that first argument, bestie:
- 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, andtkwaitwaits for a change in its visibility state (as indicated by the arrival of aVisibilityNotifyevent). 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 thetkwaitcommand 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. π
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. yes, bestie: inner wait has to wrap up before the outer wait can finish β nested-call rules, no cap. ππ«Ά
π SEE ALSO π
π·οΈ KEYWORDS π·οΈ
variablevisibilitywaitwindow
sign-off: source/version is Tk, this page is tkwait(n), and the footer doesnβt print a date, so Iβm not inventing one, bestie π«Άπ. go wait on your variables and windows responsibly β mwah π
β¨
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1992 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms