Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r3d4cb79342d1f74cdcc39d6d8b87e9c475f2706a -re93a98a8c141031f447d38f4f1f536515ec1e44b --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 3d4cb79342d1f74cdcc39d6d8b87e9c475f2706a) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision e93a98a8c141031f447d38f4f1f536515ec1e44b) @@ -50,11 +50,25 @@ namespace import ::nsf::alias ::nsf::is ::nsf::relation interp alias {} ::xotcl::next {} ::nsf::xotclnext - #namespace import ::nx::Attribute - # if we do this, "::xotcl::Class create Role -superclass Attribute" will fail. - #interp alias {} ::xotcl::Attribute {} ::nx::Attribute - ::nx::MetaSlot create ::xotcl::Attribute -superclass ::nx::Attribute + # + # create ::xotcl::MetaSlot for better compatibility with XOTcl 1 + # + ::nx::Class create ::xotcl::MetaSlot -superclass ::nx::MetaSlot { + :attribute parameter + :method init {} { + if {[info exists :parameter]} {:attributes ${:parameter}} + next + } + # provide minimal compatibility + :public forward instproc %self public method + :public forward proc %self public class-object method + } + # + # Create ::xotcl::Attribute for compatibility + # + ::xotcl::MetaSlot create ::xotcl::Attribute -superclass ::nx::Attribute + proc ::xotcl::self {{arg ""}} { switch $arg { "" {uplevel ::nsf::self}