MASON-INTEREST-L Archives

January 2012

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced 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
Content-Transfer-Encoding:
8bit
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
From:
Luís de Sousa <[log in to unmask]>
Date:
Tue, 3 Jan 2012 09:17:19 +0100
Content-Type:
text/plain; charset=ISO-8859-1
MIME-Version:
1.0
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (28 lines)
Dear all,

I would like to have a permanent chart displaying the evolution of one
of the simulation properties. I added a
TimeSeriesChartingPropertyInspector property to the GUI class that is
initialized this way:

chart = new TimeSeriesChartingPropertyInspector(
	Properties.getProperties(sim, false, false, false), 1, this, null);

where sim is the State class instance. This way I was getting a null
pointer exception; I tracked it down to the ChartingPropertyInspector
class, where I had to change line 124 in one of the constructors:

this.generator.getFrame().addWindowListener(wl);

Originally the reference was to the generator argument, which before
simulation start is null.

But after correcting this, even though the chart panel is created at
the beginning of the simulation, no data is sent to it and it remains
void. So the question is: how can I have a chart automatically set up
at the beginning of the simulation?

Thank you and an happy 2012,

Luís

ATOM RSS1 RSS2