I'm learning Racket (formerly PLT Scheme, a LISP dialect) and try to discover how to handle events different than paint-callback
(maybe it's not even one).
I hoped a lot from this part of the doc but on-char
and on-event
seem to do nothing that could interest me (or nothing at all).
Plus, I don't understand eventspaces, queue-callback and their uses. An example would be a cool thing! I'll be thankful to the nice man who'll write me one :).
Here's my code:
(define game (new frame%))
(define gameLay (class canvas% (super-new)))
(new gameLay
[parent game]
[paint-callback (λ (canvas dc) #|draw things|#)])
I want to use something like "on-mouse-click-left" (which doesn't exist) the way I use "paint-callback" but I think I need to add steps (I've read about eventspaces etc.). I know it doesn't work but here's the hypothetical code I'm searching for:
(new gameLay
[parent game]
[paint-callback (λ (canvas dc) #|draw things|#)]
[on-mouse-click-left (λ (canvas dc) #|do other things|#)])