Index: TODO =================================================================== diff -u -r0d9049bafe2426251bd7d8e9a36faa68e91ad518 -rd9d84c89e05b9bd5cc02b37725ce32a7f08ec2ad --- TODO (.../TODO) (revision 0d9049bafe2426251bd7d8e9a36faa68e91ad518) +++ TODO (.../TODO) (revision d9d84c89e05b9bd5cc02b37725ce32a7f08ec2ad) @@ -5515,7 +5515,7 @@ - updated "/cls/ info filters" and "/obj/ info object filters" - dropped "/cls/ info mixin guard" and "/obj/ info object mixin guard" dropped "/cls/ info filter guard" and "/obj/ info object filter guard" - (use "-guard option insteads) + (use "-guard option insteads)y - updated "/cls/ mixins ...", "/obj/ object mixins ...", "/cls/ filteres ...", "/obj/ object filters ..." @@ -5528,14 +5528,20 @@ - reduce variable scope - make sure to follow nonnull assumptions +nsf.c: +- implement a new approach to error reporting in ensembles: + instead of trying to find the "right" place to report the best "error", + compute the longest valid ensemble prefix from all the stack frames. +nx.tcl: +- simplify the info ensembles on nx::Object or nx::Class significantly, + by making use if ensemble-next. +- delete "info unknown", since this is not called. ======================================================================== TODO: -- EnsembleObject->unknown is still not correct - "C info object mixin classes" complains about "object" - and not about "mixin". - The message for "C info mixin classes" is fine +- check "info info" on nx::Class and nx::Object. + Probably broken ... but not really needed. - finish plural reform - update migration guide and tutorial Index: library/nx/nx.tcl =================================================================== diff -u -r14dd62afced4b677c75a9ac6e3bc71497c6c746d -rd9d84c89e05b9bd5cc02b37725ce32a7f08ec2ad --- library/nx/nx.tcl (.../nx.tcl) (revision 14dd62afced4b677c75a9ac6e3bc71497c6c746d) +++ library/nx/nx.tcl (.../nx.tcl) (revision d9d84c89e05b9bd5cc02b37725ce32a7f08ec2ad) @@ -473,9 +473,8 @@ set path [lrange $callInfo 1 end-1] set m [lindex $callInfo end] set obj [lindex $callInfo 0] - ::nsf::__db_show_stack - puts stderr "CI=<$callInfo> args <$args>" - + #::nsf::__db_show_stack + #puts stderr "CI=<$callInfo> args <$args>" #puts stderr "### [list $obj ::nsf::methods::object::info::lookupmethods -path \"$path *\"]" if {[catch {set valid [$obj ::nsf::methods::object::info::lookupmethods -path "$path *"]} errorMsg]} { set valid "" @@ -788,9 +787,6 @@ # be the same as defined above. ###################################################################### - EnsembleObject create ::nx::Class::slot::__info - Class alias info ::nx::Class::slot::__info - # # The following test is just for the redefinition case, after a # "package forget". We clear "info method" for ::nx::Object to avoid @@ -801,17 +797,10 @@ } # - # Copy all info methods except the sub-objects to - # ::nx::Class::slot::__info + # There is not need to copy the "info object" ensemble to + # ::nx::Class since this is reached via ensemble "next" in + # nx::Object. # - nsf::object::property ::nx::Class::slot::__info keepcallerself false - foreach m [::nsf::directdispatch ::nx::Object::slot::__info ::nsf::methods::object::info::methods] { - if {[::nsf::directdispatch ::nx::Object::slot::__info ::nsf::methods::object::info::method type $m] eq "object"} continue - set definition [::nsf::directdispatch ::nx::Object::slot::__info ::nsf::methods::object::info::method definition $m] - ::nx::Class::slot::__info {*}[lrange $definition 1 end] - unset definition - } - nsf::object::property ::nx::Class::slot::__info keepcallerself true Class eval { :alias "info lookup" ::nx::Object::slot::__info::lookup @@ -853,11 +842,6 @@ return "valid options are: [join [lsort $methods] {, }]" } - Object protected method "info unknown" {method obj:object args} { - return -code error \ - "[::nsf::self] unknown info option \"$method\"; [$obj info info]" - } - Object method "info info" {} {::nx::internal::infoOptions ::nx::Object::slot::__info} Class method "info info" {} {::nx::internal::infoOptions ::nx::Class::slot::__info}