MASON-INTEREST-L Archives

August 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Axel Kowald <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Fri, 21 Aug 2015 12:50:42 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (20 lines)
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

ATOM RSS1 RSS2