summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-24 15:58:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-24 15:58:14 (GMT)
commited5dd16c2ee4779451651a8edade91ecca229538 (patch)
tree0e741b18c7772ea2b0697532929f42140056ee0b
parent196c6c9af3eb4b96a9b0b94f7e41963167b534b8 (diff)
downloadtk-ed5dd16c2ee4779451651a8edade91ecca229538.zip
tk-ed5dd16c2ee4779451651a8edade91ecca229538.tar.gz
tk-ed5dd16c2ee4779451651a8edade91ecca229538.tar.bz2
Consistant Tcl_WrongNumArg() arguments when the command contains ?-option value ...? arguments
-rw-r--r--doc/fontchooser.n4
-rw-r--r--generic/tkBusy.c2
-rw-r--r--generic/tkListbox.c2
-rw-r--r--generic/tkPanedWindow.c2
-rw-r--r--generic/tkTextTag.c2
-rw-r--r--tests/busy.test2
-rw-r--r--tests/listbox.test2
-rw-r--r--tests/textTag.test2
8 files changed, 9 insertions, 9 deletions
diff --git a/doc/fontchooser.n b/doc/fontchooser.n
index 65aa8e7..465af2e 100644
--- a/doc/fontchooser.n
+++ b/doc/fontchooser.n
@@ -11,7 +11,7 @@
.SH NAME
fontchooser \- control font selection dialog
.SH SYNOPSIS
-\fBtk fontchooser\fR \fBconfigure\fR ?\fI\-option value \-option value ...\fR?
+\fBtk fontchooser\fR \fBconfigure\fR ?\fI\-option value ...\fR?
.sp
\fBtk fontchooser\fR \fBshow\fR
.sp
@@ -31,7 +31,7 @@ caller via callbacks or virtual events.
.PP
The \fBtk fontchooser\fR command can have one of the following forms:
.TP
-\fBtk fontchooser\fR \fBconfigure \fR?\fI\-option value \-option value ...\fR?
+\fBtk fontchooser\fR \fBconfigure \fR?\fI\-option value ...\fR?
.
Set or query one or more of the configurations options below (analogous to Tk
widget configuration).
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index de09d1c..f639b59 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.c
@@ -865,7 +865,7 @@ Tk_BusyObjCmd(
case BUSY_CONFIGURE:
if (objc < 3) {
- Tcl_WrongNumArgs(interp, 2, objv, "window ?-option? ?value ...?");
+ Tcl_WrongNumArgs(interp, 2, objv, "window ?-option value ...?");
return TCL_ERROR;
}
busyPtr = GetBusy(interp, busyTablePtr, objv[2]);
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index a9eee94..6a90b3c 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -906,7 +906,7 @@ ListboxWidgetObjCmd(
if (objc < 3) {
Tcl_WrongNumArgs(interp, 2, objv,
- "index ?-option? ?value? ?-option value ...?");
+ "index ?-option value ...?");
result = TCL_ERROR;
break;
}
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index 285e907..05ddcca 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -690,7 +690,7 @@ PanedWindowWidgetObjCmd(
case PW_PANECONFIGURE:
if (objc < 3) {
Tcl_WrongNumArgs(interp, 2, objv,
- "pane ?-option? ?value -option value ...?");
+ "pane ?-option value ...?");
result = TCL_ERROR;
break;
}
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index 4918a9f..2050cc8 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -357,7 +357,7 @@ TkTextTagCmd(
if (objc < 4) {
Tcl_WrongNumArgs(interp, 3, objv,
- "tagName ?-option? ?value? ?-option value ...?");
+ "tagName ?-option value ...?");
return TCL_ERROR;
}
tagPtr = TkTextCreateTag(textPtr, Tcl_GetString(objv[3]), &newTag);
diff --git a/tests/busy.test b/tests/busy.test
index f0b11be..bc0ae5f 100644
--- a/tests/busy.test
+++ b/tests/busy.test
@@ -182,7 +182,7 @@ test busy-3.7 {tk busy cget unix} -setup {
test busy-4.1 {tk busy configure no window} -returnCodes error -body {
tk busy configure
-} -result {wrong # args: should be "tk busy configure window ?-option? ?value ...?"}
+} -result {wrong # args: should be "tk busy configure window ?-option value ...?"}
test busy-4.2 {tk busy configure invalid window} -body {
tk busy configure .f
diff --git a/tests/listbox.test b/tests/listbox.test
index 9b667cd..d2fb66d 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -2854,7 +2854,7 @@ test listbox-23.4 {ConfigureListboxItem, wrong num args} -setup {
set result
} -cleanup {
destroy .l
-} -result {wrong # args: should be ".l itemconfigure index ?-option? ?value? ?-option value ...?"}
+} -result {wrong # args: should be ".l itemconfigure index ?-option value ...?"}
test listbox-23.5 {ConfigureListboxItem, multiple calls} -setup {
destroy .l
} -body {
diff --git a/tests/textTag.test b/tests/textTag.test
index 2fad125..94db751 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -488,7 +488,7 @@ test textTag-4.5 {TkTextTagCmd - "cget" option} -body {
test textTag-5.1 {TkTextTagCmd - "configure" option} -body {
.t tag configure
-} -returnCodes error -result {wrong # args: should be ".t tag configure tagName ?-option? ?value? ?-option value ...?"}
+} -returnCodes error -result {wrong # args: should be ".t tag configure tagName ?-option value ...?"}
test textTag-5.2 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -foo
} -returnCodes error -result {unknown option "-foo"}