Index: library/lib/xotcl1.xotcl =================================================================== diff -u -r666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0 -r9ebd1309a52b27ab92e9e3cce07037767efe4a4f --- library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision 666f7ad2cb2562f3d62fc9aea54efb9b0826f6b0) +++ library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision 9ebd1309a52b27ab92e9e3cce07037767efe4a4f) @@ -123,20 +123,6 @@ error "[::xotcl::self] unknown info option \"$method\"; [.info info]" } - foreach cmd [::info command ::xotcl::cmd::ObjectInfo::*] { - set cmdName [namespace tail $cmd] - if {$cmdName eq "method"} continue - ::xotcl::alias ::xotcl::objectInfo $cmdName $cmd - ::xotcl::alias ::xotcl::classInfo $cmdName $cmd - } - foreach cmd [::info command ::xotcl::cmd::ClassInfo::*] { - ::xotcl::alias ::xotcl::classInfo [namespace tail $cmd] $cmd - } - ::xotcl::alias ::xotcl::objectInfo is ::xotcl::is - ::xotcl::alias ::xotcl::classInfo is ::xotcl::is - ::xotcl::alias ::xotcl::classInfo classparent ::xotcl::cmd::ObjectInfo::parent - ::xotcl::alias ::xotcl::classInfo classchildren ::xotcl::cmd::ObjectInfo::children - # # Backward compatibility info subcommands; # @@ -239,21 +225,21 @@ # info options emulated by "info method" .method instbody {o methodName} { - lindex [::xotcl::cmd::ObjectInfo::method $o definition $methodName] end + lindex [::xotcl::cmd::ClassInfo::method $o definition $methodName] end } # info options emulated by "info methods" .method instcommands {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -defined {*}$pattern } .method instprocs {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype scripted {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -defined -methodtype scripted {*}$pattern } .method parametercmd {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined -per-object -methodtype setter {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -defined -per-object -methodtype setter {*}$pattern } .method instparametercmd {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype setter {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -defined -methodtype setter {*}$pattern } } @@ -264,15 +250,15 @@ # info options emulated by "info method" .method body {o methodName} { - lindex [::xotcl::cmd::ObjectInfo::method $o -per-object definition $methodName] end + lindex [::xotcl::cmd::ObjectInfo::method $o definition $methodName] end } # info options emulated by "info methods" .method commands {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined -per-object {*}$pattern + ::xotcl::cmd::ObjectInfo::methods $o -defined {*}$pattern } .method procs {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined -per-object -methodtype scripted {*}$pattern + ::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype scripted {*}$pattern } .method methods { o -nocmds:switch -noprocs:switch -incontext:switch pattern:optional @@ -286,6 +272,23 @@ eval $cmd } } + + foreach cmd [::info command ::xotcl::cmd::ObjectInfo::*] { + set cmdName [namespace tail $cmd] + if {$cmdName in [list "method" "methods"]} continue + ::xotcl::alias ::xotcl::objectInfo $cmdName $cmd + ::xotcl::alias ::xotcl::classInfo $cmdName $cmd + } + foreach cmd [::info command ::xotcl::cmd::ClassInfo::*] { + set cmdName [namespace tail $cmd] + if {$cmdName in [list "method" "methods"]} continue + ::xotcl::alias ::xotcl::classInfo $cmdName $cmd + } + ::xotcl::alias ::xotcl::objectInfo is ::xotcl::is + ::xotcl::alias ::xotcl::classInfo is ::xotcl::is + ::xotcl::alias ::xotcl::classInfo classparent ::xotcl::cmd::ObjectInfo::parent + ::xotcl::alias ::xotcl::classInfo classchildren ::xotcl::cmd::ObjectInfo::children + # define info methods from objectInfo on classInfo as well ::xotcl::alias classInfo body objectInfo::body ::xotcl::alias classInfo commands objectInfo::commands