[Newbies] Color definition problem with robots
chrisgame at pobox.com
Wed Oct 9 13:55:23 UTC 2019
Hello, working through the 'Programming with Robots' book, the next annoyance
I've come to is on setting colors for objects/robots (p64 in the book). In
the following - simplified - example:
| pica |
pica := Bot new.
pica color: Color red.
# all well so far
pica color: Color r:1 g:1 b:0 .
-this is as per the book but throws up a message 'MessageNotUnderstood:
Trying various syntax changes doesn't help. The text in the book reads:
"For example, the expression Color r: 1 g: 0 b: 0 creates the same pure red
color that you get from Color red."
Maybe I'm missing something obvious, and I know I can use names for the
colo(u)rs, but it's annoying to hit a bump like this.
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
More information about the Beginners