/*
Marcus Daniels  
03/15/2001 swarm-support

FW> The code fragment belows shows how a bugList is traversed to pick
FW> a bug (i.c., Bug #1), how it is tried to change its colour
FW> (doesn't work) and how MesageProbe is retrieved (with
FW> getProbeForMessage, which is a method of a SwarmObject!)  to
print
FW> out the X-position of the bug. 

MessageProbes are working for me.  (See example below.)

If you think there is a bug somehow, you'll need to write an example I
can compile and run, not a `blurb' with undefined degrees of
freedom...

*/

import swarm.Globals;
import swarm.objectbase.SwarmObjectImpl;
import swarm.objectbase.MessageProbe;
import swarm.defobj.Zone;

public class TestMessageProbe extends SwarmObjectImpl {

  public double getXPos ()
  {
    return 2.5;
  }

  static void main (String args[]) {
    Globals.env.initSwarm ("TestMessageProbe", "bug-swarm@swarm.org", 
			   "0.0",  args);
    TestMessageProbe testMessageProbe =
      new TestMessageProbe (Globals.env.globalZone);
    testMessageProbe.test ();
  }

  TestMessageProbe (Zone aZone) {
    super (aZone);
  }

  void test () {
    MessageProbe messageProbe = getProbeForMessage ("getXPos");

    System.out.println (messageProbe.doubleDynamicCallOn (this));
  }

}












