Index: generic/predefined.h =================================================================== diff -u -r7c35873dabef0d6f513e3c9b6844dacfd7574277 -rc74faac63d3cf530ab8fee0fb2bb2226a107cd31 --- generic/predefined.h (.../predefined.h) (revision 7c35873dabef0d6f513e3c9b6844dacfd7574277) +++ generic/predefined.h (.../predefined.h) (revision c74faac63d3cf530ab8fee0fb2bb2226a107cd31) @@ -241,7 +241,7 @@ "error \"Property $prop of ${.domain}->$obj ist not multivalued\"}\n" "set perObject [expr {${per-object} ? \"-per-object\" : \"\"}]\n" "set oldSetting [::xotcl::relation $obj {*}$perObject $prop]\n" -"$obj $prop {*}$perObject [linsert $oldSetting $pos $value]}\n" +"::xotcl::relation $obj {*}$perObject $prop [linsert $oldSetting $pos $value]}\n" "proc ::xotcl::register_system_slots {os} {\n" "${os}::Object alloc ${os}::Class::slot\n" "${os}::Object alloc ${os}::Object::slot\n" Index: generic/predefined.xotcl =================================================================== diff -u -r7c35873dabef0d6f513e3c9b6844dacfd7574277 -rc74faac63d3cf530ab8fee0fb2bb2226a107cd31 --- generic/predefined.xotcl (.../predefined.xotcl) (revision 7c35873dabef0d6f513e3c9b6844dacfd7574277) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision c74faac63d3cf530ab8fee0fb2bb2226a107cd31) @@ -469,7 +469,7 @@ } set perObject [expr {${per-object} ? "-per-object" : ""}] set oldSetting [::xotcl::relation $obj {*}$perObject $prop] - $obj $prop {*}$perObject [linsert $oldSetting $pos $value] + ::xotcl::relation $obj {*}$perObject $prop [linsert $oldSetting $pos $value] } ############################################ @@ -484,7 +484,6 @@ ::xotcl::InfoSlot create ${os}::Object::slot::class -type relation ::xotcl::alias ${os}::Object::slot::class assign ::xotcl::relation - ::xotcl::InterceptorSlot create ${os}::Object::slot::mixin \ -type relation Index: tests/interceptor-slot.xotcl =================================================================== diff -u -re591522c92d208c4942888e632546262fd7641ad -rc74faac63d3cf530ab8fee0fb2bb2226a107cd31 --- tests/interceptor-slot.xotcl (.../interceptor-slot.xotcl) (revision e591522c92d208c4942888e632546262fd7641ad) +++ tests/interceptor-slot.xotcl (.../interceptor-slot.xotcl) (revision c74faac63d3cf530ab8fee0fb2bb2226a107cd31) @@ -32,8 +32,14 @@ C mixin delete M2 ? {c1 info precedence} "::M ::C ::xotcl2::Object" C mixin delete M +# per-object mixins ? {c1 info precedence} "::C ::xotcl2::Object" c1 mixin add M +? {::xotcl::relation c1 mixin} ::M +? {catch {c1 mixin UNKNWON}} 1 +# after an error in mixin, the list is reset to empty. Wanted? +? {::xotcl::relation c1 mixin} "" +c1 mixin add M ? {c1 info precedence} "::M ::C ::xotcl2::Object" c1 mixin add M2 ? {c1 info precedence} "::M2 ::M ::C ::xotcl2::Object" @@ -42,6 +48,7 @@ c1 mixin delete M2 ? {c1 info precedence} "::C ::xotcl2::Object" + # # adding, removing per-object mixins for classes through relation # @@ -56,6 +63,10 @@ # C mixin -per-object add M ? {C info precedence} "::M ::xotcl2::Class ::xotcl2::Object" +? {::xotcl::relation C -per-object mixin} ::M +# is the following wanted? +? {catch {C mixin -per-object add UNKNWON}} 1 +? {::xotcl::relation C -per-object mixin} "" C mixin -per-object "" ? {C info precedence} "::xotcl2::Class ::xotcl2::Object"