MASON-INTEREST-L Archives

August 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Fri, 21 Aug 2015 12:50:42 +0200
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Message-ID:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset=windows-1252
From:
Axel Kowald <[log in to unmask]>
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