summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-09-16 08:23:51 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-09-16 08:23:51 (GMT)
commit70026155bd110d8ce98f5d5a9a7291241a25c9b5 (patch)
treea07ef296f333a500772ac136654297bb9964013b
parent808da48cd7696837330651c15909a7d65c3d7a70 (diff)
parent7cf5207818e3ecc3b7a6a03bcafafb755f693297 (diff)
downloadtk-70026155bd110d8ce98f5d5a9a7291241a25c9b5.zip
tk-70026155bd110d8ce98f5d5a9a7291241a25c9b5.tar.gz
tk-70026155bd110d8ce98f5d5a9a7291241a25c9b5.tar.bz2
Fix [d0c55bd78a]: inaccurate documentation for continue/break/ok in binding scripts. Thanks to Brad Lanam.
-rw-r--r--doc/bind.n24
1 files changed, 17 insertions, 7 deletions
diff --git a/doc/bind.n b/doc/bind.n
index becc08b..009fd08 100644
--- a/doc/bind.n
+++ b/doc/bind.n
@@ -19,9 +19,10 @@ bind \- Arrange for X events to invoke Tcl scripts
.PP
The \fBbind\fR command associates Tcl scripts with X events.
If all three arguments are specified, \fBbind\fR will
-arrange for \fIscript\fR (a Tcl script) to be evaluated whenever
-the event(s) given by \fIsequence\fR occur in the window(s)
-identified by \fItag\fR.
+arrange for \fIscript\fR (a Tcl script called the
+.QW "binding script")
+to be evaluated whenever the event(s) given by \fIsequence\fR
+occur in the window(s) identified by \fItag\fR.
If \fIscript\fR is prefixed with a
.QW + ,
then it is appended to
@@ -387,7 +388,8 @@ For example, \fB<Control\-comma>\fR is equivalent to
\fB<Control\-KeyPress\-comma>\fR.
.SH "BINDING SCRIPTS AND SUBSTITUTIONS"
.PP
-The \fIscript\fR argument to \fBbind\fR is a Tcl script,
+The \fIscript\fR argument to \fBbind\fR is a Tcl script, called the
+.QW "binding script",
which will be executed whenever the given event sequence occurs.
\fICommand\fR will be executed in the same interpreter that the
\fBbind\fR command was executed in, and it will run at global
@@ -606,13 +608,21 @@ the window.
.PP
The \fBcontinue\fR and \fBbreak\fR commands may be used inside a
binding script to control the processing of matching scripts.
-If \fBcontinue\fR is invoked, then the current binding script
-is terminated but Tk will continue processing binding scripts
-associated with other \fItag\fR's.
+If \fBcontinue\fR is invoked within a binding script, then this
+binding script, including all other
+.QW +
+appended scripts, is terminated but Tk will continue processing
+binding scripts associated with other \fItag\fR's.
If the \fBbreak\fR command is invoked within a binding script,
then that script terminates and no other scripts will be invoked
for the event.
.PP
+Within a script called from the binding script, \fBreturn\fR
+\fB-code ok\fR may be used to continue processing (including
+.QW +
+appended scripts), or \fBreturn\fR \fB-code break\fR may be used to
+stop processing all other binding scripts.
+.PP
If more than one binding matches a particular event and they
have the same \fItag\fR, then the most specific binding
is chosen and its script is evaluated.