Print

Print


Okay I fixed it !
It was, of course, my fault. But it was tricky.
At the beginning of my GUI class I had a single line that messed up the
checkpoint loading.
For convenience I created a variable by casting state into my class type
and I used this variable later for the setField() method of the
portrayal. When I loaded a checkpoint the state in SimState was
correctly replaced with the new state, but my _mgdState was still
referencing the old state (which contained no objects). That way I ended
up using two different ObjectGrid2D objects for the simulation and for
display !

------------------------------------
public class MoveGrowDieWithGUI extends GUIState{
    MoveGrowDie _mgdState = (MoveGrowDie) state; => Bad! This is messing
up checkpoint loading !
------------------------------------

Axel