Bug 1204 : Book p. 459 - Code errors
Last modified: 2010-04-22 12:45




Status:
ASSIGNED
Resolution:
-
Priority:
P2
Severity:
normal

 

Reporter:
Bravo
Assigned To:
REAS

Attachment Type Created Size Actions

Description:   Opened: 2009-03-14 08:13
Dear authors,

I came across two problems in my copy of "Processing" not mentioned in the
processing.org errata.

Line 15 of code 48-08:

if (press == true) {

will generate the error message:

Cannot find anything named "press"

The line should be changed to:

if (pressed == true) {

because "pressed" is the name of the boolean variable in the superclass (p.
439, code 47-05, line 8) that this class extension refers to.

Line 16 of code 48-09:

icon.update(mouseX, mouseY);

will generate the error message:

The method update() in the type sketch_48_09.Button is not applicable for
the arguments (int, int)

The line should be changed to:

icon.update();

because the "update()" method of the superclass (p. 439, code 47-05, line
8) that this class extension refers to calls for no input variables.
Additional Comment #1 From REAS 2010-04-22 12:45
Thank you, this will be fixed at the next printing.
This bug is now being tracked here.