File
doc/tkwait.n
— part of check-in
[3fa2c360]
at
2016-03-11 14:47:03
on branch trunk
— Excess spacing in documentation
(user:
jan.nijtmans
size: 2033)
[more...]
0000: 27 5c 22 0a 27 5c 22 20 43 6f 70 79 72 69 67 68 '\".'\" Copyrigh
0010: 74 20 28 63 29 20 31 39 39 32 20 54 68 65 20 52 t (c) 1992 The R
0020: 65 67 65 6e 74 73 20 6f 66 20 74 68 65 20 55 6e egents of the Un
0030: 69 76 65 72 73 69 74 79 20 6f 66 20 43 61 6c 69 iversity of Cali
0040: 66 6f 72 6e 69 61 2e 0a 27 5c 22 20 43 6f 70 79 fornia..'\" Copy
0050: 72 69 67 68 74 20 28 63 29 20 31 39 39 34 2d 31 right (c) 1994-1
0060: 39 39 36 20 53 75 6e 20 4d 69 63 72 6f 73 79 73 996 Sun Microsys
0070: 74 65 6d 73 2c 20 49 6e 63 2e 0a 27 5c 22 0a 27 tems, Inc..'\".'
0080: 5c 22 20 53 65 65 20 74 68 65 20 66 69 6c 65 20 \" See the file
0090: 22 6c 69 63 65 6e 73 65 2e 74 65 72 6d 73 22 20 "license.terms"
00a0: 66 6f 72 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 for information
00b0: 6f 6e 20 75 73 61 67 65 20 61 6e 64 20 72 65 64 on usage and red
00c0: 69 73 74 72 69 62 75 74 69 6f 6e 0a 27 5c 22 20 istribution.'\"
00d0: 6f 66 20 74 68 69 73 20 66 69 6c 65 2c 20 61 6e of this file, an
00e0: 64 20 66 6f 72 20 61 20 44 49 53 43 4c 41 49 4d d for a DISCLAIM
00f0: 45 52 20 4f 46 20 41 4c 4c 20 57 41 52 52 41 4e ER OF ALL WARRAN
0100: 54 49 45 53 2e 0a 27 5c 22 0a 2e 54 48 20 74 6b TIES..'\"..TH tk
0110: 77 61 69 74 20 6e 20 22 22 20 54 6b 20 22 54 6b wait n "" Tk "Tk
0120: 20 42 75 69 6c 74 2d 49 6e 20 43 6f 6d 6d 61 6e Built-In Comman
0130: 64 73 22 0a 2e 73 6f 20 6d 61 6e 2e 6d 61 63 72 ds"..so man.macr
0140: 6f 73 0a 2e 42 53 0a 27 5c 22 20 4e 6f 74 65 3a os..BS.'\" Note:
0150: 20 20 64 6f 20 6e 6f 74 20 6d 6f 64 69 66 79 20 do not modify
0160: 74 68 65 20 2e 53 48 20 4e 41 4d 45 20 6c 69 6e the .SH NAME lin
0170: 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 62 65 e immediately be
0180: 6c 6f 77 21 0a 2e 53 48 20 4e 41 4d 45 0a 74 6b low!..SH NAME.tk
0190: 77 61 69 74 20 5c 2d 20 57 61 69 74 20 66 6f 72 wait \- Wait for
01a0: 20 76 61 72 69 61 62 6c 65 20 74 6f 20 63 68 61 variable to cha
01b0: 6e 67 65 20 6f 72 20 77 69 6e 64 6f 77 20 74 6f nge or window to
01c0: 20 62 65 20 64 65 73 74 72 6f 79 65 64 0a 2e 53 be destroyed..S
01d0: 48 20 53 59 4e 4f 50 53 49 53 0a 5c 66 42 74 6b H SYNOPSIS.\fBtk
01e0: 77 61 69 74 20 76 61 72 69 61 62 6c 65 20 5c 66 wait variable \f
01f0: 49 6e 61 6d 65 5c 66 52 0a 2e 73 70 0a 5c 66 42 Iname\fR..sp.\fB
0200: 74 6b 77 61 69 74 20 76 69 73 69 62 69 6c 69 74 tkwait visibilit
0210: 79 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 2e 73 70 y \fIname\fR..sp
0220: 0a 5c 66 42 74 6b 77 61 69 74 20 77 69 6e 64 6f .\fBtkwait windo
0230: 77 20 5c 66 49 6e 61 6d 65 5c 66 52 0a 2e 42 45 w \fIname\fR..BE
0240: 0a 2e 53 48 20 44 45 53 43 52 49 50 54 49 4f 4e ..SH DESCRIPTION
0250: 0a 2e 50 50 0a 54 68 65 20 5c 66 42 74 6b 77 61 ..PP.The \fBtkwa
0260: 69 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 20 77 61 it\fR command wa
0270: 69 74 73 20 66 6f 72 20 6f 6e 65 20 6f 66 20 73 its for one of s
0280: 65 76 65 72 61 6c 20 74 68 69 6e 67 73 20 74 6f everal things to
0290: 20 68 61 70 70 65 6e 2c 0a 74 68 65 6e 20 69 74 happen,.then it
02a0: 20 72 65 74 75 72 6e 73 20 77 69 74 68 6f 75 74 returns without
02b0: 20 74 61 6b 69 6e 67 20 61 6e 79 20 6f 74 68 65 taking any othe
02c0: 72 20 61 63 74 69 6f 6e 73 2e 0a 54 68 65 20 72 r actions..The r
02d0: 65 74 75 72 6e 20 76 61 6c 75 65 20 69 73 20 61 eturn value is a
02e0: 6c 77 61 79 73 20 61 6e 20 65 6d 70 74 79 20 73 lways an empty s
02f0: 74 72 69 6e 67 2e 0a 49 66 20 74 68 65 20 66 69 tring..If the fi
0300: 72 73 74 20 61 72 67 75 6d 65 6e 74 20 69 73 20 rst argument is
0310: 5c 66 42 76 61 72 69 61 62 6c 65 5c 66 52 20 28 \fBvariable\fR (
0320: 6f 72 20 61 6e 79 20 61 62 62 72 65 76 69 61 74 or any abbreviat
0330: 69 6f 6e 20 6f 66 0a 69 74 29 20 74 68 65 6e 20 ion of.it) then
0340: 74 68 65 20 73 65 63 6f 6e 64 20 61 72 67 75 6d the second argum
0350: 65 6e 74 20 69 73 20 74 68 65 20 6e 61 6d 65 20 ent is the name
0360: 6f 66 20 61 20 67 6c 6f 62 61 6c 20 76 61 72 69 of a global vari
0370: 61 62 6c 65 20 61 6e 64 20 74 68 65 0a 63 6f 6d able and the.com
0380: 6d 61 6e 64 20 77 61 69 74 73 20 66 6f 72 20 74 mand waits for t
0390: 68 61 74 20 76 61 72 69 61 62 6c 65 20 74 6f 20 hat variable to
03a0: 62 65 20 6d 6f 64 69 66 69 65 64 2e 0a 49 66 20 be modified..If
03b0: 74 68 65 20 66 69 72 73 74 20 61 72 67 75 6d 65 the first argume
03c0: 6e 74 20 69 73 20 5c 66 42 76 69 73 69 62 69 6c nt is \fBvisibil
03d0: 69 74 79 5c 66 52 20 28 6f 72 20 61 6e 79 20 61 ity\fR (or any a
03e0: 62 62 72 65 76 69 61 74 69 6f 6e 0a 6f 66 20 69 bbreviation.of i
03f0: 74 29 20 74 68 65 6e 20 74 68 65 20 73 65 63 6f t) then the seco
0400: 6e 64 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 nd argument is t
0410: 68 65 20 6e 61 6d 65 20 6f 66 20 61 20 77 69 6e he name of a win
0420: 64 6f 77 20 61 6e 64 20 74 68 65 0a 5c 66 42 74 dow and the.\fBt
0430: 6b 77 61 69 74 5c 66 52 20 63 6f 6d 6d 61 6e 64 kwait\fR command
0440: 20 77 61 69 74 73 20 66 6f 72 20 61 20 63 68 61 waits for a cha
0450: 6e 67 65 20 69 6e 20 69 74 73 0a 76 69 73 69 62 nge in its.visib
0460: 69 6c 69 74 79 20 73 74 61 74 65 20 28 61 73 20 ility state (as
0470: 69 6e 64 69 63 61 74 65 64 20 62 79 20 74 68 65 indicated by the
0480: 20 61 72 72 69 76 61 6c 20 6f 66 20 61 20 56 69 arrival of a Vi
0490: 73 69 62 69 6c 69 74 79 4e 6f 74 69 66 79 0a 65 sibilityNotify.e
04a0: 76 65 6e 74 29 2e 20 20 54 68 69 73 20 66 6f 72 vent). This for
04b0: 6d 20 69 73 20 74 79 70 69 63 61 6c 6c 79 20 75 m is typically u
04c0: 73 65 64 20 74 6f 20 77 61 69 74 20 66 6f 72 20 sed to wait for
04d0: 61 20 6e 65 77 6c 79 2d 63 72 65 61 74 65 64 0a a newly-created.
04e0: 77 69 6e 64 6f 77 20 74 6f 20 61 70 70 65 61 72 window to appear
04f0: 20 6f 6e 20 74 68 65 20 73 63 72 65 65 6e 20 62 on the screen b
0500: 65 66 6f 72 65 20 74 61 6b 69 6e 67 20 73 6f 6d efore taking som
0510: 65 20 61 63 74 69 6f 6e 2e 0a 49 66 20 74 68 65 e action..If the
0520: 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e 74 20 first argument
0530: 69 73 20 5c 66 42 77 69 6e 64 6f 77 5c 66 52 20 is \fBwindow\fR
0540: 28 6f 72 20 61 6e 79 20 61 62 62 72 65 76 69 61 (or any abbrevia
0550: 74 69 6f 6e 0a 6f 66 20 69 74 29 20 74 68 65 6e tion.of it) then
0560: 20 74 68 65 20 73 65 63 6f 6e 64 20 61 72 67 75 the second argu
0570: 6d 65 6e 74 20 69 73 20 74 68 65 20 6e 61 6d 65 ment is the name
0580: 20 6f 66 20 61 20 77 69 6e 64 6f 77 20 61 6e 64 of a window and
0590: 20 74 68 65 0a 5c 66 42 74 6b 77 61 69 74 5c 66 the.\fBtkwait\f
05a0: 52 20 63 6f 6d 6d 61 6e 64 20 77 61 69 74 73 20 R command waits
05b0: 66 6f 72 20 74 68 61 74 20 77 69 6e 64 6f 77 20 for that window
05c0: 74 6f 20 62 65 20 64 65 73 74 72 6f 79 65 64 2e to be destroyed.
05d0: 0a 54 68 69 73 20 66 6f 72 6d 20 69 73 20 74 79 .This form is ty
05e0: 70 69 63 61 6c 6c 79 20 75 73 65 64 20 74 6f 20 pically used to
05f0: 77 61 69 74 20 66 6f 72 20 61 20 75 73 65 72 20 wait for a user
0600: 74 6f 20 66 69 6e 69 73 68 20 69 6e 74 65 72 61 to finish intera
0610: 63 74 69 6e 67 0a 77 69 74 68 20 61 20 64 69 61 cting.with a dia
0620: 6c 6f 67 20 62 6f 78 20 62 65 66 6f 72 65 20 75 log box before u
0630: 73 69 6e 67 20 74 68 65 20 72 65 73 75 6c 74 20 sing the result
0640: 6f 66 20 74 68 61 74 20 69 6e 74 65 72 61 63 74 of that interact
0650: 69 6f 6e 2e 0a 2e 50 50 0a 57 68 69 6c 65 20 74 ion...PP.While t
0660: 68 65 20 5c 66 42 74 6b 77 61 69 74 5c 66 52 20 he \fBtkwait\fR
0670: 63 6f 6d 6d 61 6e 64 20 69 73 20 77 61 69 74 69 command is waiti
0680: 6e 67 20 69 74 20 70 72 6f 63 65 73 73 65 73 20 ng it processes
0690: 65 76 65 6e 74 73 20 69 6e 0a 74 68 65 20 6e 6f events in.the no
06a0: 72 6d 61 6c 20 66 61 73 68 69 6f 6e 2c 20 73 6f rmal fashion, so
06b0: 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e the application
06c0: 20 77 69 6c 6c 20 63 6f 6e 74 69 6e 75 65 20 74 will continue t
06d0: 6f 20 72 65 73 70 6f 6e 64 0a 74 6f 20 75 73 65 o respond.to use
06e0: 72 20 69 6e 74 65 72 61 63 74 69 6f 6e 73 2e 0a r interactions..
06f0: 49 66 20 61 6e 20 65 76 65 6e 74 20 68 61 6e 64 If an event hand
0700: 6c 65 72 20 69 6e 76 6f 6b 65 73 20 5c 66 42 74 ler invokes \fBt
0710: 6b 77 61 69 74 5c 66 52 20 61 67 61 69 6e 2c 20 kwait\fR again,
0720: 74 68 65 20 6e 65 73 74 65 64 20 63 61 6c 6c 0a the nested call.
0730: 74 6f 20 5c 66 42 74 6b 77 61 69 74 5c 66 52 20 to \fBtkwait\fR
0740: 6d 75 73 74 20 63 6f 6d 70 6c 65 74 65 20 62 65 must complete be
0750: 66 6f 72 65 20 74 68 65 20 6f 75 74 65 72 20 63 fore the outer c
0760: 61 6c 6c 20 63 61 6e 20 63 6f 6d 70 6c 65 74 65 all can complete
0770: 2e 0a 2e 53 48 20 22 53 45 45 20 41 4c 53 4f 22 ...SH "SEE ALSO"
0780: 0a 62 69 6e 64 28 6e 29 2c 20 76 77 61 69 74 28 .bind(n), vwait(
0790: 6e 29 0a 2e 53 48 20 4b 45 59 57 4f 52 44 53 0a n)..SH KEYWORDS.
07a0: 76 61 72 69 61 62 6c 65 2c 20 76 69 73 69 62 69 variable, visibi
07b0: 6c 69 74 79 2c 20 77 61 69 74 2c 20 77 69 6e 64 lity, wait, wind
07c0: 6f 77 0a 27 5c 22 20 4c 6f 63 61 6c 20 56 61 72 ow.'\" Local Var
07d0: 69 61 62 6c 65 73 3a 0a 27 5c 22 20 6d 6f 64 65 iables:.'\" mode
07e0: 3a 20 6e 72 6f 66 66 0a 27 5c 22 20 45 6e 64 3a : nroff.'\" End:
07f0: 0a .