Index: generic/gentclAPI.decls =================================================================== diff -u -rd9b42d77f43db84a9983cc3bbc4124cf0b52df29 -rf20a7f81bcae20a40c4990afd431615ca1914c51 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision d9b42d77f43db84a9983cc3bbc4124cf0b52df29) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision f20a7f81bcae20a40c4990afd431615ca1914c51) @@ -252,8 +252,8 @@ objectInfoMethod hastype XOTclObjInfoHasTypeMethod { {-argName "class" -type class} } -objectInfoMethod istype XOTclObjInfoIsTypeMethod { - {-argName "objectkind" -type "object|class|baseclass|metaclass"} +objectInfoMethod is XOTclObjInfoIsMethod { + {-argName "objectkind" -type "class|baseclass|metaclass"} } objectInfoMethod method XOTclObjInfoMethodMethod { {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition"} Index: generic/tclAPI.h =================================================================== diff -u -rd9b42d77f43db84a9983cc3bbc4124cf0b52df29 -rf20a7f81bcae20a40c4990afd431615ca1914c51 --- generic/tclAPI.h (.../tclAPI.h) (revision d9b42d77f43db84a9983cc3bbc4124cf0b52df29) +++ generic/tclAPI.h (.../tclAPI.h) (revision f20a7f81bcae20a40c4990afd431615ca1914c51) @@ -57,13 +57,13 @@ static int convertToObjectkind(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; - static CONST char *opts[] = {"object", "class", "baseclass", "metaclass", NULL}; + static CONST char *opts[] = {"class", "baseclass", "metaclass", NULL}; result = Tcl_GetIndexFromObj(interp, objPtr, opts, "objectkind", 0, &index); *clientData = (ClientData) INT2PTR(index + 1); *outObjPtr = objPtr; return result; } -enum ObjectkindIdx {ObjectkindNULL, ObjectkindObjectIdx, ObjectkindClassIdx, ObjectkindBaseclassIdx, ObjectkindMetaclassIdx}; +enum ObjectkindIdx {ObjectkindNULL, ObjectkindClassIdx, ObjectkindBaseclassIdx, ObjectkindMetaclassIdx}; static int convertToAssertionsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { @@ -189,7 +189,7 @@ static int XOTclObjInfoHasMixinMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoHasTypeMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoHasnamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); -static int XOTclObjInfoIsTypeMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); +static int XOTclObjInfoIsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoMixinclassesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -269,7 +269,7 @@ static int XOTclObjInfoHasMixinMethod(Tcl_Interp *interp, XOTclObject *obj, XOTclClass *class); static int XOTclObjInfoHasTypeMethod(Tcl_Interp *interp, XOTclObject *obj, XOTclClass *class); static int XOTclObjInfoHasnamespaceMethod(Tcl_Interp *interp, XOTclObject *obj); -static int XOTclObjInfoIsTypeMethod(Tcl_Interp *interp, XOTclObject *obj, int objectkind); +static int XOTclObjInfoIsMethod(Tcl_Interp *interp, XOTclObject *obj, int objectkind); static int XOTclObjInfoMethodMethod(Tcl_Interp *interp, XOTclObject *obj, int infomethodsubcmd, CONST char *name); static int XOTclObjInfoMethodsMethod(Tcl_Interp *interp, XOTclObject *obj, int withMethodtype, int withCallprotection, int withNomixins, int withIncontext, CONST char *pattern); static int XOTclObjInfoMixinclassesMethod(Tcl_Interp *interp, XOTclObject *obj, int withGuards, int withOrder, CONST char *patternString, XOTclObject *patternObj); @@ -350,7 +350,7 @@ XOTclObjInfoHasMixinMethodIdx, XOTclObjInfoHasTypeMethodIdx, XOTclObjInfoHasnamespaceMethodIdx, - XOTclObjInfoIsTypeMethodIdx, + XOTclObjInfoIsMethodIdx, XOTclObjInfoMethodMethodIdx, XOTclObjInfoMethodsMethodIdx, XOTclObjInfoMixinclassesMethodIdx, @@ -1265,20 +1265,20 @@ } static int -XOTclObjInfoIsTypeMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { +XOTclObjInfoIsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; XOTclObject *obj = (XOTclObject *)clientData; if (!obj) return XOTclObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], - method_definitions[XOTclObjInfoIsTypeMethodIdx].paramDefs, - method_definitions[XOTclObjInfoIsTypeMethodIdx].nrParameters, + method_definitions[XOTclObjInfoIsMethodIdx].paramDefs, + method_definitions[XOTclObjInfoIsMethodIdx].nrParameters, &pc) != TCL_OK) { return TCL_ERROR; } else { int objectkind = (int )PTR2INT(pc.clientData[0]); parseContextRelease(&pc); - return XOTclObjInfoIsTypeMethod(interp, obj, objectkind); + return XOTclObjInfoIsMethod(interp, obj, objectkind); } } @@ -2129,7 +2129,7 @@ {"::nsf::cmd::ObjectInfo::hasnamespace", XOTclObjInfoHasnamespaceMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo::istype", XOTclObjInfoIsTypeMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::is", XOTclObjInfoIsMethodStub, 1, { {"objectkind", 0, 0, convertToObjectkind}} }, {"::nsf::cmd::ObjectInfo::method", XOTclObjInfoMethodMethodStub, 2, { Index: generic/xotcl.c =================================================================== diff -u -r5e70792b640c7d8b9a7235ba529dbfc0af2b84ad -rf20a7f81bcae20a40c4990afd431615ca1914c51 --- generic/xotcl.c (.../xotcl.c) (revision 5e70792b640c7d8b9a7235ba529dbfc0af2b84ad) +++ generic/xotcl.c (.../xotcl.c) (revision f20a7f81bcae20a40c4990afd431615ca1914c51) @@ -14035,18 +14035,14 @@ } /* -objectInfoMethod istype XOTclObjInfoIsTypeMethod { - {-argName "objectkind" -type "object|class|baseclass|metaclass"} +objectInfoMethod is XOTclObjInfoIsMethod { + {-argName "objectkind" -type "class|baseclass|metaclass"} } */ -static int XOTclObjInfoIsTypeMethod(Tcl_Interp *interp, XOTclObject *object, int objectkind) { +static int XOTclObjInfoIsMethod(Tcl_Interp *interp, XOTclObject *object, int objectkind) { int success = 0; switch (objectkind) { - case ObjectkindObjectIdx: - success = 1; - break; - case ObjectkindClassIdx: success = (XOTclObjectIsClass(object) > 0); break; @@ -14065,8 +14061,6 @@ return TCL_OK; } - - /* objectInfoMethod method XOTclObjInfoMethodMethod { {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition"} Index: library/lib/doc-tools.tcl =================================================================== diff -u -rd9b42d77f43db84a9983cc3bbc4124cf0b52df29 -rf20a7f81bcae20a40c4990afd431615ca1914c51 --- library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision d9b42d77f43db84a9983cc3bbc4124cf0b52df29) +++ library/lib/doc-tools.tcl (.../doc-tools.tcl) (revision f20a7f81bcae20a40c4990afd431615ca1914c51) @@ -301,7 +301,6 @@ set r [dict create] # puts stderr SLOTS=$slots foreach s $slots { - # [$s info is type ::nx::doc::PartAttribute] if {![$s info has type ::nx::doc::PartAttribute] || ![$s eval {info exists :part_class}]} continue; set accessor [$s name] # puts stderr "PROCESSING ACCESSOR $accessor, [info exists :$accessor]" Index: library/nx/nx.tcl =================================================================== diff -u -rd9b42d77f43db84a9983cc3bbc4124cf0b52df29 -rf20a7f81bcae20a40c4990afd431615ca1914c51 --- library/nx/nx.tcl (.../nx.tcl) (revision d9b42d77f43db84a9983cc3bbc4124cf0b52df29) +++ library/nx/nx.tcl (.../nx.tcl) (revision f20a7f81bcae20a40c4990afd431615ca1914c51) @@ -853,7 +853,7 @@ :alias "info has mixin" ::nsf::cmd::ObjectInfo::hasmixin :alias "info has namespace" ::nsf::cmd::ObjectInfo::hasnamespace :alias "info has type" ::nsf::cmd::ObjectInfo::hastype - :alias "info is" ::nsf::cmd::ObjectInfo::istype + :alias "info is" ::nsf::cmd::ObjectInfo::is :alias "info methods" ::nsf::cmd::ObjectInfo::methods :alias "info mixin guard" ::nsf::cmd::ObjectInfo::mixinguard :alias "info mixin classes" ::nsf::cmd::ObjectInfo::mixinclasses @@ -1779,14 +1779,14 @@ Slot method type=baseclass {name value} { # note, that we cannot use "nsf::is baseclass ..." here, since nsf::is call this converter - if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::cmd::ObjectInfo::istype baseclass]} { + if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::cmd::ObjectInfo::is baseclass]} { error "expected baseclass but got \"$value\" for parameter $name" } return $value } Slot method type=metaclass {name value} { - if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::cmd::ObjectInfo::istype metaclass]} { + if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::cmd::ObjectInfo::is metaclass]} { error "expected metaclass but got \"$value\" for parameter $name" } return $value Index: library/xotcl/apps/scripts/soccerClub2.tcl =================================================================== diff -u -rf3b7952aabc9e4f9079febd1f5b7f5fb833fd50c -rf20a7f81bcae20a40c4990afd431615ca1914c51 --- library/xotcl/apps/scripts/soccerClub2.tcl (.../soccerClub2.tcl) (revision f3b7952aabc9e4f9079febd1f5b7f5fb833fd50c) +++ library/xotcl/apps/scripts/soccerClub2.tcl (.../soccerClub2.tcl) (revision f20a7f81bcae20a40c4990afd431615ca1914c51) @@ -68,7 +68,7 @@ # But we only remove matching playernames of type "Player". We do # not want to remove another club member type who has the same # name. - if {[$player info is type Player] && [$player name] eq $playername} { + if {[$player info has type Player] && [$player name] eq $playername} { # We simply 'move' the player object to the destination team. # Again we use a unique autoname in the new scope $player move ${destinationTeam}::[$destinationTeam autoname player%02d] @@ -85,7 +85,7 @@ SoccerTeam method printPlayers {} { puts "Players of ${.name}:" foreach m [.info children] { - if {[$m info is type Player]} {puts " [$m name]"} + if {[$m info has type Player]} {puts " [$m name]"} } }