1 /* methodcmd8.swg : Tcl8.x method invocation */
3 static int Tcl@CLASS@MethodCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
4 int (*cmd)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*) = 0;
8 Tcl_Obj *oldarg,*tcl_result,*obj;
12 tcl_result = Tcl_GetObjResult(interp);
13 objv = (Tcl_Obj **) _objv;
15 Tcl_SetStringObj(tcl_result,"@CLASS@ methods : { @METHODLIST@ }",-1);
19 SWIG_SetPointerObj(obj,(void *) clientData,"@CLASSMANGLE@");
20 _str = Tcl_GetStringFromObj(objv[1],&length);
24 else if ((c == 'c') && (strncmp(_str,"configure",length) == 0) && (length >= 2)) {
28 _str = Tcl_GetStringFromObj(objv[i],&length);
33 rcode = (*cmd)(clientData,interp,3,&objv[i-1]);
35 if (rcode == TCL_ERROR) {
36 Tcl_DecrRefCount(obj);
41 Tcl_SetStringObj(tcl_result,"Invalid configure option. Must be { @CONFIGLIST@ }",-1);
42 Tcl_DecrRefCount(obj);
47 if ((i < objc) || (i == 2)) {
48 Tcl_SetStringObj(tcl_result,"{ @CONFIGLIST@ }",-1);
49 Tcl_DecrRefCount(obj);
52 Tcl_DecrRefCount(obj);
54 } else if ((c == 'c') && (strncmp(_str,"cget",length) == 0) && (length >= 2)) {
56 _str = Tcl_GetStringFromObj(objv[2],&length);
59 else if (strcmp(_str,"-this") == 0) {
60 SWIG_SetPointerObj(tcl_result,(void *) clientData, "@CLASSMANGLE@");
61 Tcl_DecrRefCount(obj);
67 rcode = (*cmd)(clientData,interp,objc-1,&objv[1]);
69 Tcl_DecrRefCount(obj);
72 Tcl_SetStringObj(tcl_result,"Invalid cget option. Must be { -this @CGETLIST@ }",-1);
73 Tcl_DecrRefCount(obj);
77 Tcl_SetStringObj(tcl_result,"{ -this @CGETLIST@ }", -1);
78 Tcl_DecrRefCount(obj);
83 Tcl_SetStringObj(tcl_result,"Invalid Method. Must be { @METHODLIST@}",-1);
84 Tcl_DecrRefCount(obj);
89 rcode = (*cmd)(clientData,interp,objc,objv);
91 Tcl_DecrRefCount(obj);