Print

Print


Hi all,

I just added a custom gui as one of the tabs on my console.  The GUI adds
agents with the defined vars to a Bag called agentList.  I want to then run
the simulation (If the inspected property inputType is GUI), generating the
agents from this bag as opposed to randomly, like it does when 
inputType != GUI.  I've coded the simulation.start() method to read from the
bag when the flag is set (inputType == GUI) but the problem is I cant get
the Bag agentList populated in time.  The mySimulationWithUI file, which
extends GUIState, has an overridden start() method, but the super.start()
(which triggers the chain of events that eventually calls the
simulation.start() method) has to be the first line of an overridden method.
 So I am wondering where I should be putting the code that reads the GUI
(that runs between when the play button is pressed, and the simulations
start() method is called), or should I be trying to access the console from
the simulation.start() method (how would I do this if so).

Thanks
-T