swarm-support
[Top][All Lists]
Advanced

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

perform$with and object-to-display-object binding


From: Fred Wan
Subject: perform$with and object-to-display-object binding
Date: Thu, 22 Mar 2001 20:02:36 +0100

Hi,

In the Interface DefinedObject there is a method perform$with (actually a
whole family). What is its use?

In the following fragment (complete sources are included) SimpleBug objects
are bound to a Object2dDisplayImpl object. Is such a binding 1-1? In other
words, if a Object2dDisplayImpl object has been created can no other object
than a SimpleBug display on the ZoomRasterImpl object provided?

The message created (in ObserverSwarm) is this one:

  try{
    bugDisplay = new Object2dDisplayImpl
        (getZone(), worldRaster, modelSwarm.getWorld(),
         new Selector(Class.forName("SimpleBug"),"drawSelfOn", false));
  } catch (Exception e) {
    System.err.println("Exception in buildObjects drawSelfOn: " +
e.getMessage());
  }

Now, I was looking for a way to circumvent creating another
Object2dDisplayImpl by trying to send another "drawSelfOn" message from
_another_ class than SimpleBug to the bugDisplay object. Is that possible,
or is it necessary to create another Object2dDisplayImpl object for this
class?

Thanks,
Fred.

Attachment: FoodSpace.java
Description: Binary data

Attachment: ModelSwarm.java
Description: Binary data

Attachment: ObserverSwarm.java
Description: Binary data

Attachment: SimpleBug.java
Description: Binary data

Attachment: StartSimpleBug.java
Description: Binary data

Attachment: TargetBug.java
Description: Binary data


reply via email to

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