dyoo / WeScheme

29 stars 16 forks source link

on-draw/to-draw is not bound #30

Closed dyoo closed 12 years ago

dyoo commented 13 years ago

From Shriram:

(big-bang 0 [on-tick add1] [on-draw (lambda (w) (place-image (text (number->string w) 10 "black") 50 50 (empty-scene 100 100)))])

but I get

on-draw: expected a dom-s-expression, but received instead.

So now we can no longer run DrRacket world programs?

Finally, I tried (replacing "on" with "to"):

(big-bang 0 [on-tick add1] [to-draw (lambda (w) (place-image (text (number->string w) 10 "black") 50 50 (empty-scene 100 100)))])

and now something strange happened. First, it said "to-draw" is not bound, which is bad enough. Furthermore, it said

reference to an identifier before its definition: to-draw at: line 3, column 10, in at: line 1, column 0, in

But the LHS position of a big-bang is not an expression position, so why am I getting unbound identifier messages?

dyoo commented 12 years ago

I need to restart the server side compiler with the updated bindings to to-draw. I have not done so yet because I need to find a good, idle time when the compiler's not being used much. I'll try to restart it around midnight tonight and see if I can close this.

dyoo commented 12 years ago

Fixed.