MASON-INTEREST-L Archives

March 2011

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:
"Samuel W. Brett (SWB)" <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Wed, 2 Mar 2011 11:32:46 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
Okay, here are the problems I am having. scheduleImmediateRepast method
is deprecated in my version of Mason. Frame.show() is deprecated as
well, not sure that matters as I guess the pack method takes care of
that now. The chart never gets initialized in my init method for some
reason. When the start method is called, chart is null.

-Sam

-----Original Message-----
From: MASON Multiagent Simulation Toolkit
[mailto:[log in to unmask]] On Behalf Of Sean Luke
Sent: Tuesday, March 01, 2011 6:35 PM
To: [log in to unmask]
Subject: Re: Creating Charts in Mason v15

On Mar 1, 2011, at 6:20 PM, Samuel W. Brett (SWB) wrote:

> Well the addSeries method seems to be deprecated. In addition, the how

> to says to put certain code in the init method of the gui class.
> Whenever I put the code in there it never seems to get called.

Hmmm, there are *no* deprecated methods in the MASON charting code.   
addSeries is correct, so I'm confused.

The init(...) method will be called once, when the GUI for your
simulation is being fired up (more specifically, when the Console has
been created).  It's *definitely* being called -- it's a very important
method!  Are you perhaps returning from this method before you get to
the chart code?  Or have you built an init(...) method somewhere else?
It's the method in your GUIState subclass.

To double-check, I cut-and-pasted from the HowTo code into sim/app/ 
antsforage/AntsForageWithUI.java to try it out, and it works nicely.   
Here's some code for you to double-check against.

ATOM RSS1 RSS2