diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkbltGrElemOp.C | 15 |
1 files changed, 11 insertions, 4 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; } |