[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: drawSelfOn:
From: |
Marcus G. Daniels |
Subject: |
Re: drawSelfOn: |
Date: |
13 Sep 2000 13:00:29 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "FW" == Fred Wan <address@hidden> writes:
FW> I have trouble understanding the following fragment in
FW> SimpleObserverBug and translating it to Java. Can someone help me
FW> out here? Especially the M(drawSelfOn) is puzzling. In jheatbugs a
FW> message is sent to a heatbug object that then draws itself, but
FW> what happens here is unclear.
It's the same idea. The drawSelfOn: message gets sent to the Bug instances
in the world. drawSelfOn: gets passed the raster that you specify
via setDisplayWidget:. Without the argument, the Bug would not have any
info about where to draw itself. (That's at the end of Bug.m.)
The setObjectCollection: is optional. It makes it faster to send the
drawSelfOn: messages (otherwise it is necessary to look at all the points
on the grid). The grid itself is specified by setDiscrete2dDisplay:, and
it is needed in order to track where Bugs are.
==================================
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.
- Re: drawSelfOn:,
Marcus G. Daniels <=