Index: TODO =================================================================== diff -u -r1d47ca3db133ff4eef6bf13f35c5f4e7bfd49a20 -rc88fac9594630181e97e2f936891a0bdb9065cca --- TODO (.../TODO) (revision 1d47ca3db133ff4eef6bf13f35c5f4e7bfd49a20) +++ TODO (.../TODO) (revision c88fac9594630181e97e2f936891a0bdb9065cca) @@ -1271,18 +1271,16 @@ - reflected changes in /is/objectproperty/info has/info is/ in migration guide - changed stub naming from "[Nn][Xx]*" to nsf (for next scripting framework) +- checked "my" vs. "nsf::dispatch" in nx.tcl and xotcl2.tcl +- "child objects" are showed per default in "info methods" TODO: -- implement built-in-converter for "baseclass" and "metaclass"? - check equivalence of the following two commands in respect to fully-qualified names ::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::hastype $class ::nsf::parametercheck object,type=$class $obj -- check "my" vs. "nsf::dispatch" in xotcl2.tcl -- overthink decision about not showing "child objects" per default in "info methods" - - subcmd * handle sucmd for other method factories * handle introspection for subcmd nicely @@ -1295,7 +1293,6 @@ - aliases on procs are a problem, when upvar is used (see info default/instdefault in xotcl2.tcl) - - interfaces in documentation for slots (see for more details ::nx::Class#superclass in nx.tcl). - nameing @@ -1488,15 +1485,13 @@ "x:type,arg=::D d1" => "-name x -type type -arg ::D -default d1" - use parameter syntax in genTclAPI -- info valuecheck? -- turn off optionally value checking -- get rid of "::xotcl::is"? - # TODO (optimization): optimizer can improve parameter checking: # (a) simple approach: make scripted setter methods on domain # (b) maybe nicer: provide arguments to c-setter to # pass parameter definition +- implement built-in-converter for "baseclass" and "metaclass"? + - the two flags "-objscope" and "-nonleaf" are for adding frames, and they are mutual exclusive. Make them a single flag? check if both options are in every case sensible. Index: library/nx/nx.tcl =================================================================== diff -u -ra3e419eb3993464990b3f32550892e1bc11124fd -rc88fac9594630181e97e2f936891a0bdb9065cca --- library/nx/nx.tcl (.../nx.tcl) (revision a3e419eb3993464990b3f32550892e1bc11124fd) +++ library/nx/nx.tcl (.../nx.tcl) (revision c88fac9594630181e97e2f936891a0bdb9065cca) @@ -348,7 +348,7 @@ foreach w [lrange $path 0 end-1] { #puts stderr "check $object info methods $path @ <$w>" set scope [expr {[nsf::is class $object] && !${per-object} ? "Class" : "Object"}] - if {[$object ::nsf::cmd::${scope}Info::methods -methodtype all $w] eq ""} { + if {[::nsf::dispatch $object ::nsf::cmd::${scope}Info::methods $w] eq ""} { # # Create dispatch/ensemble object and accessor method (if wanted) # @@ -373,8 +373,8 @@ # The accessor method exists already, check, if it is # appropriate for extending. # - set type [$object ::nsf::cmd::${scope}Info::method type $w] - set definition [$object ::nsf::cmd::${scope}Info::method definition $w] + set type [::nsf::dispatch $object ::nsf::cmd::${scope}Info::method type $w] + set definition [::nsf::dispatch $object ::nsf::cmd::${scope}Info::method definition $w] if {$scope eq "Class"} { if {$type ne "alias"} {error "can't append to $type"} if {$definition eq ""} {error "definition must not be empty"} @@ -882,9 +882,9 @@ # # copy all methods except the subobjects to ::nx::Class::slot::__info # - foreach m [::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::methods] { - if {[::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method type $m] eq "object"} continue - set definition [::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method definition $m] + foreach m [::nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::methods] { + if {[::nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method type $m] eq "object"} continue + set definition [::nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method definition $m] ::nx::Class::slot::__info {*}[lrange $definition 1 end] } @@ -914,7 +914,7 @@ proc ::nx::infoOptions {obj} { #puts stderr "INFO INFO $obj -> '[::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods -methodtype all]'" set methods [list] - foreach name [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods -methodtype all] { + foreach name [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods] { if {$name eq "unknown"} continue lappend methods $name } @@ -2021,7 +2021,7 @@ ####################################################### #puts stderr Class-methods=[lsort [Class info methods]] - foreach m [Class info methods -methodtype all] { + foreach m [Class info methods] { ::nsf::methodproperty Class $m class-only true }