Index: library/lib/xotcl1.xotcl =================================================================== diff -u -rd34c425b8c87ad62b8879114f4aa8454162f09ed -rc09536ecf46b5a272a87a42a7deb59b852df5ec8 --- library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision d34c425b8c87ad62b8879114f4aa8454162f09ed) +++ library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision c09536ecf46b5a272a87a42a7deb59b852df5ec8) @@ -156,19 +156,16 @@ # # already emulated: # - # => info params .... replaces + # => info method parameter .... replaces # info args # info nonposargs # info default # - # => info instparams .... replaces + # => info -per-object method parameter .... replaces # info instargs # info instnonposargs # info instdefault # - # => maybe instead of "info params" and "info instparams" - # info params ?-per-object? - # # => info method .... replaces # info body # info instbody @@ -200,31 +197,31 @@ # TODO move unknown handler for Class into a library # - proc ::xotcl::info_args {inst o method} { + proc ::xotcl::info_args {allocation o method} { set result [list] foreach \ - argName [::xotcl::classInfo ${inst}params $o $method -varNames] \ - flag [::xotcl::classInfo ${inst}params $o $method] { + argName [::xotcl::cmd::${allocation}Info::method $o args $method] \ + flag [::xotcl::cmd::${allocation}Info::method $o parameter $method] { if {[string match -* $flag]} continue lappend result $argName } #puts stderr "+++ get ${inst}args for $o $method => $result" return $result } - proc ::xotcl::info_nonposargs {inst o method} { + proc ::xotcl::info_nonposargs {allocation o method} { set result [list] - foreach flag [::xotcl::classInfo ${inst}params $o $method] { + foreach flag [::xotcl::cmd::${allocation}Info::method $o parameter $method] { if {![string match -* $flag]} continue lappend result $flag } #puts stderr "+++ get ${inst}nonposargs for $o $method => $result" return $result } - proc ::xotcl::info_default {inst o method arg varName} { + proc ::xotcl::info_default {allocation o method arg varName} { foreach \ - argName [::xotcl::classInfo ${inst}params $o $method -varNames] \ - flag [::xotcl::classInfo ${inst}params $o $method] { + argName [::xotcl::cmd::${allocation}Info::method $o args $method] \ + flag [::xotcl::cmd::${allocation}Info::method $o parameter $method] { if {$argName eq $arg} { upvar 3 $varName default if {[llength $flag] == 2} { @@ -240,12 +237,12 @@ error "procedure \"$method\" doesn't have an argument \"$varName\"" } classInfo eval { - .method instargs {o method} {::xotcl::info_args inst $o $method} - .method args {o method} {::xotcl::info_args "" $o $method} - .method instnonposargs {o method} {::xotcl::info_nonposargs inst $o $method} - .method nonposargs {o method} {::xotcl::info_nonposargs "" $o $method} - .method instdefault {o method arg var} {::xotcl::info_default inst $o $method $arg $var} - .method default {o method arg var} {::xotcl::info_default "" $o $method $arg $var} + .method instargs {o method} {::xotcl::info_args Class $o $method} + .method args {o method} {::xotcl::info_args Object $o $method} + .method instnonposargs {o method} {::xotcl::info_nonposargs Class $o $method} + .method nonposargs {o method} {::xotcl::info_nonposargs Object $o $method} + .method instdefault {o method arg var} {::xotcl::info_default Class $o $method $arg $var} + .method default {o method arg var} {::xotcl::info_default Object $o $method $arg $var} # info options emulated by "info method" .method instbody {o methodName} { @@ -268,9 +265,9 @@ } objectInfo eval { - .method args {o method} {::xotcl::info_args "" $o $method} - .method nonposargs {o method} {::xotcl::info_nonposargs "" $o $method} - .method default {o method arg var} {::xotcl::info_default "" $o $method $arg $var} + .method args {o method} {::xotcl::info_args Object $o $method} + .method nonposargs {o method} {::xotcl::info_nonposargs Object $o $method} + .method default {o method arg var} {::xotcl::info_default Object $o $method $arg $var} # info options emulated by "info method" .method body {o methodName} {