summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-10-08 18:45:41 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-10-08 18:45:41 (GMT)
commit243ab6b1c0e547e66a6fafe5795e80bb0761264f (patch)
tree0c54b9e927c3dcd76f702efa9c8bd13e6cca67d8
parent3eb5ca85e212ad0f434c7c8bdf9c46732c731c1b (diff)
downloadblt-243ab6b1c0e547e66a6fafe5795e80bb0761264f.zip
blt-243ab6b1c0e547e66a6fafe5795e80bb0761264f.tar.gz
blt-243ab6b1c0e547e66a6fafe5795e80bb0761264f.tar.bz2
2 minor fixes for merger #19
-rw-r--r--generic/tkbltGrElemOp.C15
-rw-r--r--tests/base.tcl16
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} {