View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] 0.84 mixin behaviour changed ??

From: Zoran Vasiljevic <zoran_at_archiware.com>
Date: Tue, 13 Mar 2001 10:27:30 +0100

Hi !

I strongly suspect that in0.84 version,
the mixin process is changed, which
brings some incompatibilities.

Please consider this simple example

Class A
Class B

A instproc init {args} {
    [self] instvar C
    [self] mixin B

    set C(Aelement) 1
}
B instproc init {args} {
    [self] instvar C
    set C(Belement) 1
}

A instproc foo {args} {
    puts "[self] A bar"
}
B instproc foo {args} {
    puts "[self] B bar"
}


The 0.83 behaviour...

% A a
% a foo
::a B bar
% a array get C
Belement 1 Aelement 1


The 0.84 behaviour

% A a
% a foo
::a B bar
% a array get C
Aelement 1


WHERE is the "Belement" ??????
It seems that 0.84 does not properly calls the "init"
on the B class before doing an mixin ?
Or am I missing something completely?
Any ideas ?


Cheer's
Zoran Vasiljevic
Archiware