Index: TODO =================================================================== diff -u -r7d197d8e8a9ad6229c2aa8a11111118f5cab26b6 -r0618932a2d3c36c40bc549b3d191ba2de8e9efa9 --- TODO (.../TODO) (revision 7d197d8e8a9ad6229c2aa8a11111118f5cab26b6) +++ TODO (.../TODO) (revision 0618932a2d3c36c40bc549b3d191ba2de8e9efa9) @@ -3482,11 +3482,14 @@ * added regression tests * fixed recration of object alias with a alias to a different cmd +- xotcl2.tcl: + * added a backward compatible ::xotcl::alias method TODO: - private: * document private in tutorial - add "property" and "attribute" and "info property" and "info slot ..." to migration guide + - add traits package - naming of slot classes * should we switch from "-class" to "-slotclass"? Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r8c3c5565c2904e379350494cd40675d1aad6a46c -r0618932a2d3c36c40bc549b3d191ba2de8e9efa9 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 8c3c5565c2904e379350494cd40675d1aad6a46c) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 0618932a2d3c36c40bc549b3d191ba2de8e9efa9) @@ -900,6 +900,24 @@ proc myproc {args} {linsert $args 0 [::xotcl::self]} proc myvar {var} {:requireNamespace; return [::xotcl::self]::$var} + # + # Provide a backward compatible version of ::xotcl::alias + # + ::nsf::proc ::xotcl::alias { + obj:object + methodName + -per-object:switch + -objscope:switch + target + } { + ::nsf::method::alias \ + $obj \ + {*}[expr {${per-object} ? "-per-object" : ""}] \ + $methodName \ + {*}[expr {${objscope} ? "-frame object" : ""}] \ + $target + } + Object create ::xotcl::config config proc load {obj file} { source $file