Index: TODO =================================================================== diff -u -N -rfc4e3f5f6a94ef7324baffab90d58cd7eb513907 -ra7ce0b3aea87386d8baa3c61fa7f4358d5ec3a5e --- TODO (.../TODO) (revision fc4e3f5f6a94ef7324baffab90d58cd7eb513907) +++ TODO (.../TODO) (revision a7ce0b3aea87386d8baa3c61fa7f4358d5ec3a5e) @@ -1938,6 +1938,8 @@ - return forwardoption "-earlybinding" via instrospection - extended regression test +- provide a more explicit way to handle resourcing after a "package + forget" in the info methods (similar to Stefan's suggestion). TODO: Index: library/nx/nx.tcl =================================================================== diff -u -N -rfc4e3f5f6a94ef7324baffab90d58cd7eb513907 -ra7ce0b3aea87386d8baa3c61fa7f4358d5ec3a5e --- library/nx/nx.tcl (.../nx.tcl) (revision fc4e3f5f6a94ef7324baffab90d58cd7eb513907) +++ library/nx/nx.tcl (.../nx.tcl) (revision a7ce0b3aea87386d8baa3c61fa7f4358d5ec3a5e) @@ -499,13 +499,20 @@ Class alias info ::nx::Class::slot::__info # - # copy all methods except the subobjects to ::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 + # confusions in the copy loop below, which uses method "method". # + if {[::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::methods "method"] ne ""} { + Object method "info method" {} {} + } + + # + # Copy all methods except the subobjects to ::nx::Class::slot::__info + # foreach m [::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::methods] { if {[::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::method type $m] eq "object"} continue set definition [::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::method definition $m] - # The following line is just for the redefinition case, after a "package forget" - if {[lindex $definition 2] eq "method"} continue ::nx::Class::slot::__info {*}[lrange $definition 1 end] unset definition }