[Newbies] two classes with the same name (Matrix issue)

stes@PANDORA.BE stes at telenet.be
Mon Jan 11 18:29:52 UTC 2021


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Platform:

/usr/lib/squeak/4.19.5-3793/squeakvm
Squeak4.6 of 11 December 2017 [latest update: #15117]
Unix built on Jan  1 2021 12:28:22 Compiler: 5.15.0
platform sources revision 3793
VMMaker versionString 4.19.5

Issue:

There exists a class Matrix subclass of Collection,
it seems to have been implemented in 2002 by 'raok' ?

Go to the Browser, select "Matrix" and browse,
and one can see Matrix, subclass of Collection.

When I open a Monticello Browser and add a repository:
http repository:

MCHttpRepository
	location: 'http://www.squeaksource.com/cakit'
	user: ''
	password: ''

I can load the Computer Algebra Kit with the "Load" button.

HOWEVER ... despite the fact that there's no warning in the Transcript,
this will now result in 2 Matrix classes in the system.

Go to the Browser, select "Matrix" and browse,
and one can see Matrix,  in the Computer Algebra Kit.

It's a different class ... but a hybrid or 'merged' version,
perhaps some sort of 'pose As' version of the original,
replaced by the different and totally different subclass Matrix in the CAkit.

Now what I can do, and that works, is before installing the Computer Algebra
Kit, I can remove the class Matrix subclass of Collection.

In fact I'm under the impression that I should do that.

If you select Matrix subclass of Collection and from the menu,
Remove class ('x') that works.

In fact, I think it is more or less required to do so,
because I suspect the steps that I did above, corrupt the image.

The old Matrix class is no longer displayed as subclass of Collection,
and the methods of the old class and comments are visible in the new class,
but that makes no sense since the instance variables of the new class,
are totally different ...


Puzzled by this result.

I think what I'm observing here is that if you load 2 classes with the same
name, and with different implementations, what Squeak 4.6 is doing,
looks like some sort of poseAs where the last class that is loads 
substitutes/replaces the first version ...


David Stes



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJf/JiUAAoJEAwpOKXMq1Man/EH/AyjlYBcb1iVF3qvjafGUM1B
Xufeifr99y7yceyuLjQloYNBuLl8/sNnf5chksqk9jJKuRn6vRI06OG60gUHMatB
TxKY4y6fevFYHoaLF6roIkjk94+BITssDZKWQpv+FiCooFpqti6FRpdfeSKL6+BZ
Y9Om0qDV0/WB+zWmB31JIjxqjPBOe7ErH9l0bB1iby0+UhWZTlZK+et6U+AL/LLA
iDQOmotY0PzMtj3teEPt3cE4BZg184ROBPsiWE8hJ2SOWNnEajFD+zA402UEQVWs
noSULFoMsLhaOnHQFRyWrJl5HfMEEx8MONl80lb41uK4O7MaFU13iu2+Wx6vsdw=
=Nxlv
-----END PGP SIGNATURE-----


More information about the Beginners mailing list