Index: generic/gentclAPI.decls =================================================================== diff -u -rd70c849219212800fa401c2227796b9a63eadcaf -r7c5c045a38db603c9a506d17a29403065256a845 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision d70c849219212800fa401c2227796b9a63eadcaf) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 7c5c045a38db603c9a506d17a29403065256a845) @@ -290,7 +290,7 @@ ### TODO move finally to infoclassmethod infoClassMethod method XOTclClassInfoMethodMethod { {-argName "class" -type class} - {-argName "infomethodsubcmd" -type "args|definition|name|parameter|type|precondition|postcondition"} + {-argName "infomethodsubcmd" -type "args|body|definition|name|parameter|type|precondition|postcondition"} {-argName "name"} } Index: generic/predefined.h =================================================================== diff -u -rd70c849219212800fa401c2227796b9a63eadcaf -r7c5c045a38db603c9a506d17a29403065256a845 --- generic/predefined.h (.../predefined.h) (revision d70c849219212800fa401c2227796b9a63eadcaf) +++ generic/predefined.h (.../predefined.h) (revision 7c5c045a38db603c9a506d17a29403065256a845) @@ -41,7 +41,6 @@ "if {$what in [list \"info\"]} {\n" "return [::xotcl2::objectInfo [lindex $args 0] [self] {*}[lrange $args 1 end]]}\n" "if {$what in [list \"filter\" \"mixin\"]} {\n" -"puts stderr \"call .object-$what {*}$args\"\n" "return [.object-$what {*}$args]}\n" "if {$what in [list \"filterguard\" \"mixinguard\"]} {\n" "return [::xotcl::dispatch [self] ::xotcl::cmd::Object::$what {*}$args]}}\n" Index: generic/tclAPI.h =================================================================== diff -u -rd70c849219212800fa401c2227796b9a63eadcaf -r7c5c045a38db603c9a506d17a29403065256a845 --- generic/tclAPI.h (.../tclAPI.h) (revision d70c849219212800fa401c2227796b9a63eadcaf) +++ generic/tclAPI.h (.../tclAPI.h) (revision 7c5c045a38db603c9a506d17a29403065256a845) @@ -1,12 +1,12 @@ static int convertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { int index, result; - static CONST char *opts[] = {"args", "definition", "name", "parameter", "type", "precondition", "postcondition", NULL}; + static CONST char *opts[] = {"args", "body", "definition", "name", "parameter", "type", "precondition", "postcondition", NULL}; result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infomethodsubcmd", 0, &index); *clientData = (ClientData) index + 1; return result; } -enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdNameIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx}; +enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdNameIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx}; static int convertToMethodtype(Tcl_Interp *interp, Tcl_Obj *objPtr, XOTclParam CONST *pPtr, ClientData *clientData) { int index, result; Index: generic/xotcl.c =================================================================== diff -u -rd70c849219212800fa401c2227796b9a63eadcaf -r7c5c045a38db603c9a506d17a29403065256a845 --- generic/xotcl.c (.../xotcl.c) (revision d70c849219212800fa401c2227796b9a63eadcaf) +++ generic/xotcl.c (.../xotcl.c) (revision 7c5c045a38db603c9a506d17a29403065256a845) @@ -9727,6 +9727,10 @@ case InfomethodsubcmdTypeIdx: Tcl_SetObjResult(interp, Tcl_NewStringObj("scripted",-1)); break; + + case InfomethodsubcmdBodyIdx: + ListProcBody(interp, GetTclProcFromCommand(cmd), methodName); + break; case InfomethodsubcmdDefinitionIdx: { Index: library/lib/xotcl1.xotcl =================================================================== diff -u -rd70c849219212800fa401c2227796b9a63eadcaf -r7c5c045a38db603c9a506d17a29403065256a845 --- library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision d70c849219212800fa401c2227796b9a63eadcaf) +++ library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision 7c5c045a38db603c9a506d17a29403065256a845) @@ -281,10 +281,8 @@ .proc instdefault {o method arg var} {::xotcl::info_default Class $o $method $arg $var} .proc default {o method arg var} {::xotcl::info_default Object $o $method $arg $var} - # info options emulated by "info method" - .proc instbody {o methodName} { - lindex [::xotcl::cmd::ClassInfo::method $o definition $methodName] end - } + # info options emulated by "info method ..." + .proc instbody {o methodName} {::xotcl::cmd::ClassInfo::method $o body $methodName} .proc instpre {o methodName} {::xotcl::cmd::ClassInfo::method $o precondition $methodName} .proc instpost {o methodName} {::xotcl::cmd::ClassInfo::method $o postcondition $methodName} @@ -308,10 +306,8 @@ .proc nonposargs {o method} {::xotcl::info_nonposargs Object $o $method} .proc default {o method arg var} {::xotcl::info_default Object $o $method $arg $var} - # info options emulated by "info method" - .proc body {o methodName} { - lindex [::xotcl::cmd::ObjectInfo::method $o definition $methodName] end - } + # info options emulated by "info method ..." + .proc body {o methodName} {::xotcl::cmd::ObjectInfo::method $o body $methodName} .proc pre {o methodName} {::xotcl::cmd::ObjectInfo::method $o pre $methodName} .proc post {o methodName} {::xotcl::cmd::ObjectInfo::method $o post $methodName}