Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r764405083cfd6152d6956674e54f3a77cf7e1dcd -ref9dd92a0a9b741825ab45dbdbcfc3cce546c0f9 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 764405083cfd6152d6956674e54f3a77cf7e1dcd) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision ef9dd92a0a9b741825ab45dbdbcfc3cce546c0f9) @@ -79,25 +79,6 @@ namespace import ::nsf::method::alias ::nsf::is ::nsf::relation interp alias {} ::xotcl::next {} ::nsf::xotclnext - # - # create ::xotcl::MetaSlot for better compatibility with XOTcl 1 - # - ::nx::Class create ::xotcl::MetaSlot -superclass ::nx::MetaSlot { - :property parameter - :method init {} { - if {[info exists :parameter]} {my ::nsf::classes::xotcl::Class::parameter ${:parameter}} - next - } - # provide minimal compatibility - :public forward instproc %self public method - :public forward proc %self public class method - } - - # - # Create ::xotcl::Attribute for compatibility - # - ::xotcl::MetaSlot create ::xotcl::Attribute -superclass ::nx::VariableSlot - proc ::xotcl::self {{arg ""}} { switch $arg { "" {uplevel ::nsf::self} @@ -930,6 +911,34 @@ proc myvar {var} {:requireNamespace; return [::xotcl::self]::$var} # + # create ::xotcl::MetaSlot for better compatibility with XOTcl 1 + # + ::nx::Class create ::xotcl::MetaSlot -superclass ::nx::MetaSlot { + :property parameter + :method init {} { + if {[info exists :parameter]} {my ::nsf::classes::xotcl::Class::parameter ${:parameter}} + next + } + # provide minimal compatibility + :public forward instproc %self public method + :public forward proc %self public class method + # + # As NX/XOTcl hybrids, all slot kinds would not inherit the + # unknown behaviour of ::xotcl::Class. Therefore, we need to + # provide it explicitly to slots for backward compatibility ... + # + :public alias unknown ::nsf::classes::xotcl::Class::unknown + } + + # + # Create ::xotcl::Attribute for compatibility + # + ::xotcl::MetaSlot create ::xotcl::Attribute -superclass ::nx::VariableSlot + # + # TODO: multivalued emulation is missing! + # + + # # Provide a backward compatible version of ::xotcl::alias # ::nsf::proc ::xotcl::alias {