MASON-INTEREST-L Archives

January 2012

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:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Sat, 7 Jan 2012 14:43:05 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
Hi Luis.  Inspectors are really meant for fleeting things.  f you're trying to set up a chart at runtime, it'd be better to do it as a display.  Try this howto:

	http://cs.gmu.edu/~eclab/projects/mason/docs/howto.html#chart

If this is still not working, I can try to help you further.

Sean

On Jan 3, 2012, at 3:17 AM, Luís de Sousa wrote:

> 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