Calico Processing Event Handlers Not Reset

Issue #115 resolved
Keith O'Hara created an issue

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)

  1. Keith O'Hara reporter

    Yes that was the problem. I should have caught that since I asked a question recently about window() vs. size()

  2. Doug Blank

    Should we leave size() different from window()? I guess it would make sense to make them different.

  3. Log in to comment