Index: TODO =================================================================== diff -u -rf7e340c5779999c9495abbb4a2112057b34e1a97 -r91c0f6d233633e6e7c76b911377b97609749bd49 --- TODO (.../TODO) (revision f7e340c5779999c9495abbb4a2112057b34e1a97) +++ TODO (.../TODO) (revision 91c0f6d233633e6e7c76b911377b97609749bd49) @@ -2721,12 +2721,17 @@ * extended regression test - nx.tcl, xotcl2.tcl: removed unsafe {*}$pattern +- added: + "info slot handle /name/" + "info slot parameter /name/" TODO: + - missing in c-based "info slots": * handle object specific "info slots" * regression tests (eg. "$cls class info slots" vs. "$cls info slots", "-closure") * "info slots" is not in the migration guide + * "info slot" is not in the migration guide - TODO: why do we have to use ::info in the "info" ensemble? see nx.tcl Index: library/nx/nx.tcl =================================================================== diff -u -rf7e340c5779999c9495abbb4a2112057b34e1a97 -r91c0f6d233633e6e7c76b911377b97609749bd49 --- library/nx/nx.tcl (.../nx.tcl) (revision f7e340c5779999c9495abbb4a2112057b34e1a97) +++ library/nx/nx.tcl (.../nx.tcl) (revision 91c0f6d233633e6e7c76b911377b97609749bd49) @@ -488,11 +488,16 @@ :alias "info mixin classes" ::nsf::methods::object::info::mixinclasses :alias "info parent" ::nsf::methods::object::info::parent :alias "info precedence" ::nsf::methods::object::info::precedence - :method "info slot" {name} { - set slot [::nsf::self]::slot::$name + :method "info slot handle" {name} { + if {![string match :* $name]} {set slot [::nsf::self]::slot::$name} if {[::nsf::object::exists $slot]} {return $slot} return "" } + :method "info slot parameter" {name} { + if {![string match :* $name]} {set slot [::nsf::self]::slot::$name} + if {[::nsf::object::exists $slot]} {return [$slot getParameterSpec]} + return "" + } :method "info slots" {{-type ::nx::Slot} pattern:optional} { set slotContainer [::nsf::self]::slot if {[::nsf::object::exists $slotContainer]} {