Index: library/nx/nx.tcl =================================================================== diff -u -re3487a745ff8d03bff82959c8fb0852e9ae23b36 -r32ed9f7d22490bc014686a0384f4e0d561ee183c --- library/nx/nx.tcl (.../nx.tcl) (revision e3487a745ff8d03bff82959c8fb0852e9ae23b36) +++ library/nx/nx.tcl (.../nx.tcl) (revision 32ed9f7d22490bc014686a0384f4e0d561ee183c) @@ -1885,7 +1885,8 @@ } :method copyTargets {} { - #puts stderr "COPY will copy targetList = [set :targetList]" + puts stderr "COPY will copy targetList = [set :targetList]" + set objs {} foreach origin [set :targetList] { set dest [:getDest $origin] if {[::nsf::object::exists $origin]} { @@ -1915,6 +1916,7 @@ } else { namespace eval $dest {} } + lappend objs $obj :copyNSVarsAndCmds $origin $dest foreach i [$origin ::nsf::methods::object::info::forward] { ::nsf::method::forward $dest -per-object $i \ @@ -1934,7 +1936,9 @@ # set base [$origin ::nsf::methods::object::info::parent] set container [namespace tail $origin] - if {$base ne "::" && [::nsf::method::property $base -per-object $container slotcontainer]} { + if {[::nsf::object::exists $base] + && [::nsf::method::property $base -per-object $container slotcontainer] + } { ::nx::setSlotContainerProperties [$dest ::nsf::methods::object::info::parent] $container } @@ -1960,6 +1964,7 @@ } } #puts stderr "=====" + puts stderr "could return <$obj>" } # @@ -1989,6 +1994,7 @@ $newslot eval :init } } + return [lindex $objs 0] } :public method copy {obj dest} { @@ -2001,13 +2007,13 @@ } - Object public method copy newName { + Object public method copy {newName} { if {[string compare [string trimleft $newName :] [string trimleft [::nsf::self] :]]} { [CopyHandler new -volatile] copy [::nsf::self] $newName } } - Object public method move newName { + Object public method move {newName} { if {[string trimleft $newName :] ne [string trimleft [::nsf::self] :]} { if {$newName ne ""} { :copy $newName