summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkCanvas.c4
-rw-r--r--tests/canvText.test10
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ec7b658..8085a52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-11 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * generic/tkCanvas.c (CanvasWidgetCmd): Corrected result generation.
+
2008-10-10 Don Porter <dgp@users.sourceforge.net>
*** 8.6a3 TAGGED FOR RELEASE ***
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index bc37043..97fd093 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.51 2008/09/30 23:54:46 dkf Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.52 2008/10/11 06:47:25 dkf Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -1712,7 +1712,7 @@ CanvasWidgetCmd(
break;
case CANV_CLEAR:
if (objc != 3) {
- Tcl_AppendResult(interp, 3, objv, NULL);
+ Tcl_WrongNumArgs(interp, 3, objv, NULL);
result = TCL_ERROR;
goto done;
}
diff --git a/tests/canvText.test b/tests/canvText.test
index 533a316..96a362a 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: canvText.test,v 1.20 2008/10/08 16:13:42 dgp Exp $
+# RCS: @(#) $Id: canvText.test,v 1.21 2008/10/11 06:47:25 dkf Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -819,7 +819,13 @@ test canvText-14.5 {GetTextIndex procedure: bad int or unknown index} -setup {
} -cleanup {
.c delete test
} -returnCodes {error} -result {bad index "xyz"}
-
+test canvText-14.6 {select clear errors} -setup {
+ .c create text 0 0 -tag test
+} -body {
+ .c select clear test
+} -cleanup {
+ .c delete test
+} -returnCodes error -result "wrong \# args: should be \".c select clear\""
test canvText-15.1 {SetTextCursor procedure} -setup {
.c create text 0 0 -tag test