[Squeakland] "Tell" and "Siblings"
scott.wallace at squeakland.org
Thu Nov 16 03:34:35 PST 2006
On Nov 16, 2006, at 12:08 AM, Guyren Howe wrote:
> What does it do when a sketch "tells" other sketches one of its
The tile command "Car tell all siblings foo" means to send the
message foo to all the Car's siblings, which means that each of Car's
siblings will invoke its own script named "foo", if it has one.
Siblings of Car are copies of it that were created with the "olive"
halo handle or by using the "copy" tile; all siblings share exactly
the same code, so that if you change the code of one, the change
> And what does "sibling" mean?
Here are some links that may be useful in getting started with
> In general, what means are available for sketches to communicate?
Some primary means for objects to communicate etoy-style are:
(a) One object simply tells another object to invoke a script
(e.g. Car avoidWall).
(b) One object tells all of its siblings to invoke a script (e.g.
Car tellAllSiblings crashAndBurn).
(c) A container tells of the objects within it to invoke a script
(e.g. Playfield tellAllContents turnGreen).
(d) An object finds out information about another object by
"getting" values from it, e.g. "Car turn by Wheel's heading".
Hope this helps. Please fire away with any more questions.
More information about the Squeakland