'''[http://www.tcl.tk/man/tcl/TclCmd/object.htm%|%oo::object]''', a [Tcl Commands%|%built-in] [Tcl] command, is the root class of all objects in [TclOO]. ** Documentation ** [http://www.tcl.tk/man/tcl/TclCmd/object.htm%|%official reference]: ** `` [method%|%Method] that Respects [namespace import%|%Imported Procedures] ** `[oo::object] ` copies aliased procedures in the origin namespace over to the new namespace as native procedures. The following method can be added to an object or a `[oo::class]`, overriding `[oo::object] ` and providing for imported procedures to end up as imported procedures in the new namespace as well. ====== method sourceObject { set fromns [info object namespace $sourceObject] set myns [self namespace] foreach varname [info vars ${fromns}::*] { set tail [namespace tail $varname] set ${myns}::$tail [set $varname] } #copycommands is from http://wiki.tcl.tk/1489 [info object namespace $sourceObject]::copycommands $fromns [ self namespace] my } ====== <> Tcl Commands | TclOO