[plt-scheme] Re: MrEd - Animated canvas

From: Laurent (Ouaibou at gmail.com)
Date: Fri Mar 9 06:56:23 EST 2007

Nodoby can help me ? :(

On 7 mar, 15:42, "Laurent" <Ouai... at gmail.com> wrote:
> With your idea, the flutters disappeared. It is super, thank you:)
>
> Now, I seek how to associate events keyboard to an action. But my code
> doesn't want to work :
>
> (define my-canvas%
>   (class canvas%
>     (define/override (on-char evt)
>       (case (send evt get-key-code))
>         ((left) (printf "left\n"))
>         ((right) (printf "right\n"))
>         (else (printf "Another key\n")))
>     (super-new)))
>
> Moreover, it is necessary to click in the canvas in order to events
> keyboards start.
>
> I don't understand why ?
>
> Thanks,
> Laurent
>
> _________________________________________________
>   For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.