Calico Processing Event Handlers Not Reset
Issue #115
resolved
Even after a shell reset old event handlers are staying around. For example, this buggy program results in an "Error in onLoop: expected float, got str" which is because text() is used improperly:
from Processing import *
size(500, 500)
frameRate(60)
def draw(o, e):
text(50, 50, "hello")
onLoop += draw
loop()
However, if I fix the program:
from Processing import *
size(500, 500)
frameRate(60)
def draw(o, e):
text("hello", 50, 50)
onLoop += draw
loop()
The same error is still reported.
Comments (4)
-
-
reporter Yes that was the problem. I should have caught that since I asked a question recently about window() vs. size()
-
Should we leave size() different from window()? I guess it would make sense to make them different.
-
reporter - changed status to resolved
Must use window() to create sketch (not size())
- Log in to comment
It looks to me that size() and window() don't do the same thing.