[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Distinguishing Next from Start.
From: |
Marcus G. Daniels |
Subject: |
Re: Distinguishing Next from Start. |
Date: |
21 Aug 2000 16:05:12 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "GO" == Gadi ORON <address@hidden> writes:
GO> Is there any way to know if the current simulation timestep is
GO> done through the "Next" button of the ProcCtrl or rather because
GO> the "Start" button was pushed?
In an ObserverSwarm, you do something like below. (You just need
to have access to the ControlPanel, one way or another.)
In Objective C ControlStateNextTime is a global variable, a Symbol.
Index: HeatbugObserverSwarm.java
===================================================================
RCS file: /cvs/hive/Swarm/jheatbugs/HeatbugObserverSwarm.java,v
retrieving revision 1.14
diff -c -r1.14 HeatbugObserverSwarm.java
*** HeatbugObserverSwarm.java 2000/02/29 00:57:40 1.14
--- HeatbugObserverSwarm.java 2000/08/21 23:02:14
***************
*** 284,289 ****
--- 284,295 ----
if (unhappyGraph != null)
unhappyGraph.step ();
+
+ if (getControlPanel ().getState () == Globals.env.ControlStateNextTime)
+ System.out.println ("Next");
+ else
+ System.out.println ("Start");
+
return this;
}
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.