On Wed, May 9, 2012 at 3:31 PM, Herby Voj����k <herby@mailbox.sk> wrote:
The cause of the problem is probably in this: if you try to inspect dzindzik, VM prints out something like "Directory does not have index: 7". If you try dzindzik instVarAt:1, dzindzik instVarAt:2, ... in a row, you get 6, but there is not 7.

This is related to the instVar 'layout' that was added to Behavior. If you analyze dzindzik, its correct. I mean, the order in its instVars are correct. Its problem is "thisClass". As you could notice, you could not inspect thisClass because you get an error with the "Directory does not have index: 7".
So, go to SystemWindows and change this method to:

SystemWindow >> #labelled: labelString
������ ^self new setLabel: 'caca'

What we do is to be able to open the inspector while avoiding to ask for its class for the label (since it is broken). Now you are able to inspect thisClass.
When you inspect this class, you will see that the first instVars (superclass, methodDict and format) are all correct. 'layout' is nil and from there, all instVars are shifted one slot. The instvar instanceVariables have a classOrganizer. The instVar subclasses has the name, etc...

so... thisClass subclasses -> #Object

Of course, you cannot inspect the last instVar 'localSelectors' because you are going out of the scope ;)

In summary it looks like dzindzik is anoher Metaclass of Object, say Object class (whose instVars are correct), and dzindzik class is Object but with broken (shifted) instVars.

That's all we could fine so far with Guille :)
��
��
So dzindzik's class thinks it has (at least) seven inst vars, but in fact in does only have six.

Herby




--
Mariano
http://marianopeck.wordpress.com