# HG changeset patch # User sugi # Date 1374556394 -32400 # Node ID ba55adb8a042466851356f54d5d7e41f92efcd8f # Parent 7e1f6b575b5a44a386356674a2f3a552029c2d76 fixed bug diff -r 7e1f6b575b5a -r ba55adb8a042 src/alice/test/topology/aquarium/CheckMyName.java --- a/src/alice/test/topology/aquarium/CheckMyName.java Tue Jul 16 16:17:31 2013 +0900 +++ b/src/alice/test/topology/aquarium/CheckMyName.java Tue Jul 23 14:13:14 2013 +0900 @@ -44,14 +44,14 @@ new CheckLocalIndex("maxsize",0); ods.update(key, new FishPoint(-0.1f,-0.1f)); - new SetLocation(new MakeObject(frame), key, 0, num); + new SetLocation(new MakeObject(frame), key, 0); new CheckLocalIndex(key,1); for (int i = 0; i < 3 ; i++){ key = "fish"+i; if (num == 0) new AutoIncrement(key,0); ods.update(key, new FishPoint((float)Math.random(), (float)Math.random(), (float)Math.random())); - new SetLocation(new MakeObject(frame), key, 0, num); + new SetLocation(new MakeObject(frame), key, 0); new CheckLocalIndex(key,1); } @@ -63,7 +63,7 @@ int rand = tmp + 1; ods.update(key, new FishPoint( (float)rand, -(float)Math.random(), -(float)Math.random())); - new SetLocation(new MakeObject(frame), key, 0, num); + new SetLocation(new MakeObject(frame), key, 0); new CheckLocalIndex(key,1); } @@ -75,7 +75,7 @@ int rand = tmp + 3; ods.update(key, new FishPoint( (float)rand, (float)Math.random(), -(float)Math.random())); - new SetLocation(new MakeObject(frame), key, 0, num); + new SetLocation(new MakeObject(frame), key, 0); new CheckLocalIndex(key,1); } @@ -89,7 +89,7 @@ ods.update(key, new FishPoint( (float)rand, -(float)Math.random(), (float)Math.random())); - new SetLocation(new MakeObject(frame), key, 0, num); + new SetLocation(new MakeObject(frame), key, 0); new CheckLocalIndex(key,1); } diff -r 7e1f6b575b5a -r ba55adb8a042 src/alice/test/topology/aquarium/RefreshWindow.java --- a/src/alice/test/topology/aquarium/RefreshWindow.java Tue Jul 16 16:17:31 2013 +0900 +++ b/src/alice/test/topology/aquarium/RefreshWindow.java Tue Jul 23 14:13:14 2013 +0900 @@ -4,22 +4,23 @@ import alice.datasegment.Receiver; public class RefreshWindow extends CodeSegment { + private Receiver num = ids.create(CommandType.PEEK); private Receiver host = ids.create(CommandType.PEEK); private MakeFrame frame; public RefreshWindow(MakeFrame frame){ - this.host.setKey("host_num"); + this.host.setKey("host"); + this.num.setKey("host_num"); this.frame = frame; } @Override public void run() { - frame.getJFrame().dispose(); ObjectList list = frame.getList(); - frame = new MakeFrame(this.host.asString(),host.asInteger()); + frame = new MakeFrame(host.asString(),num.asInteger()); for (MakeObject obj : list.table) { - this.frame.register(obj); + frame.register(obj); } } diff -r 7e1f6b575b5a -r ba55adb8a042 src/alice/test/topology/aquarium/SetLocation.java --- a/src/alice/test/topology/aquarium/SetLocation.java Tue Jul 16 16:17:31 2013 +0900 +++ b/src/alice/test/topology/aquarium/SetLocation.java Tue Jul 23 14:13:14 2013 +0900 @@ -9,11 +9,9 @@ private Receiver position = ids.create(CommandType.PEEK); private MakeObject obj; - private int range; // should be DS - public SetLocation(MakeObject obj ,String key, int index, int range){ + public SetLocation(MakeObject obj ,String key, int index){ this.obj = obj; - this.range = range; this.position.setKey(key,index); } @@ -21,7 +19,7 @@ public void run(){ FishPoint fp = this.position.asClass(FishPoint.class); obj.setLocation(fp.getX(), fp.getY(), fp.getZ()); - new SetLocation(obj, position.key, position.index, range); + new SetLocation(obj, position.key, position.index); }