|
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.
FoodSpace.java
Description: Binary data
ModelSwarm.java
Description: Binary data
ObserverSwarm.java
Description: Binary data
SimpleBug.java
Description: Binary data
StartSimpleBug.java
Description: Binary data
TargetBug.java
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |