Skip to content

Commit 409f62e

Browse files
Fix TypeError in first mouse example
Closes jdf#114
1 parent 063a269 commit 409f62e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Tutorials/interactivity/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h3>Mouse Data</h3>
3535

3636
def draw():
3737
frameRate(12)
38-
println(mouseX + " : " + mouseY)
38+
println(str(mouseX) + " : " + str(mouseY))
3939

4040
</pre>
4141
When a program starts, the mouseX and mouseY values are 0. If the cursor moves into the display window, the values are set to the current position of the cursor. If the cursor is at the left, the mouseX value is 0 and the value increases as the cursor moves to the right. If the cursor is at the top, the mouseY value is 0 and the value increases as the cursor moves down. If mouseX and mouseY are used in programs without a draw() or if noLoop() is run in setup(), the values will always be 0.
@@ -1117,4 +1117,4 @@ <h3>Cursor icon</h3>
11171117
</td>
11181118
</tr>
11191119
</table>
1120-
</div>
1120+
</div>

0 commit comments

Comments
 (0)