From 243ab6b1c0e547e66a6fafe5795e80bb0761264f Mon Sep 17 00:00:00 2001 From: William Joye Date: Mon, 8 Oct 2018 14:45:41 -0400 Subject: 2 minor fixes for merger #19 --- generic/tkbltGrElemOp.C | 15 +++++++++++---- tests/base.tcl | 16 ++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/generic/tkbltGrElemOp.C b/generic/tkbltGrElemOp.C index 1102c30..fdfe4f7 100644 --- a/generic/tkbltGrElemOp.C +++ b/generic/tkbltGrElemOp.C @@ -293,11 +293,16 @@ static int CreateOp(ClientData clientData, Tcl_Interp* interp, { Graph* graphPtr = (Graph*)clientData; - if (objc!=4) { - Tcl_WrongNumArgs(interp, 3, objv, "elemId"); + // may vary in length + // if (objc!=4) { + // Tcl_WrongNumArgs(interp, 3, objv, "elemId"); + // return TCL_ERROR; + // } + if (objc<4) { + Tcl_WrongNumArgs(interp, 3, objv, "elemId..."); return TCL_ERROR; } - + if (graphPtr->createElement(objc, objv) != TCL_OK) return TCL_ERROR; Tcl_SetObjResult(interp, objv[3]); @@ -514,7 +519,9 @@ static int ShowOp(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* const objv[]) { Graph* graphPtr = (Graph*)clientData; - if (objc!=3 || objc!=4) { + // may vary in length + if (objc<3) { + // if (objc!=3 || objc!=4) { Tcl_WrongNumArgs(interp, 3, objv, "?nameList?"); return TCL_ERROR; } diff --git a/tests/base.tcl b/tests/base.tcl index c02abfa..e3dac2e 100644 --- a/tests/base.tcl +++ b/tests/base.tcl @@ -32,8 +32,8 @@ proc bltTest {graph option value {dops 0}} { $graph postscript output foo.ps exec open /Applications/Preview.app/ foo.ps } -# after $sleep - read stdin 1 + after $sleep +# read stdin 1 $graph configure $option $org update after $sleep @@ -50,8 +50,8 @@ proc bltTest2 {graph which option value {dops 0}} { $graph postscript output foo.ps exec open /Applications/Preview.app/ foo.ps } -# after $sleep - read stdin 1 + after $sleep +# read stdin 1 $graph $which configure $option $org update after $sleep @@ -68,8 +68,8 @@ proc bltTest3 {graph which item option value {dops 0}} { $graph postscript output foo.ps exec open /Applications/Preview.app/ foo.ps } -# after $sleep - read stdin 1 + after $sleep +# read stdin 1 $graph $which configure $item $option $org update after $sleep @@ -81,8 +81,8 @@ proc bltCmd {graph args} { puts stderr " $graph $args" eval $graph $args update -# after $sleep - read stdin 1 + after $sleep +# read stdin 1 } proc bltElements {graph} { -- cgit v0.12