swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

display problems


From: Holger Perlt
Subject: display problems
Date: Fri, 31 Aug 2001 12:35:40 +0200

Hello,

two small problems:

1. Inside the ObserverSwarm2 one has the foodDisplay and the bugDisplay
methods.
If one comments out the foodDisplay then the bugs are displayed with
their trace history-
not only the present position. I would like to cancel the food stuff but
want to
have only the present positions of the bugs (not their past ones).
Somewhere in the
foodDisplay the erasing must be?!

2. I have enlarged the problem by a second class Bugg. But now I get a
run-time error
if I use the right-mouse-click method  - on both Bug and Bugg objects.
The method is constructed for the Bug class (bugDisplay).

 bugDisplay = [Object2dDisplay createBegin: self];
  [bugDisplay setDisplayWidget: worldRaster];
  [bugDisplay setDiscrete2dToDisplay: [modelSwarm getWorld]];
  [bugDisplay setObjectCollection: [modelSwarm getBugList]];
  [bugDisplay setDisplayMessage: M(drawSelfOn:)];   // draw method
  bugDisplay = [bugDisplay createEnd];

  buggDisplay = [Object2dDisplay createBegin: self];
  [buggDisplay setDisplayWidget: worldRaster];
  [buggDisplay setDiscrete2dToDisplay: [modelSwarm getWorld]];
  [buggDisplay setObjectCollection: [modelSwarm getBuggList]];
  [buggDisplay setDisplayMessage: M(drawSelfOn:)];   // draw method
  buggDisplay = [buggDisplay createEnd];

  // Also, tell the world raster to send mouse clicks to the
heatbugDisplay
  // this allows the user to right-click on the display to probe the
bugs.

  [worldRaster setButton: ButtonRight
               Client: bugDisplay
               Message: M(makeProbeAtX:Y:)];

Both problems could be interrelated via worldraster!?

Holger



-- 
PD Dr. habil. Holger Perlt
Diplomphysiker/Geschäftsführer
Reinforcement Control GmbH
Karl-Heine-Str. 99
04229 Leipzig
Germany
Phone:  ++49 (0)341 9410370
Fax:    ++49 (0)341 9410372
http://www.reinforcement.de

                  ==================================
   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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]