[plt-scheme] override on-char

From: michel.pepino at club-internet.fr (michel.pepino at club-internet.fr)
Date: Mon Dec 30 14:14:18 EST 2002

(define my-scheme:text%
  (class scheme:text%
    (override on-char)
    (define on-char
      (lambda (event) 
        (send text-definition insert (send event get-key-code))))
    (super-instantiate ())))
                       

(define definition (instantiate editor-canvas% ($panel-editor)))        
(define text-definition (instantiate my-scheme:text% ()))
(send definition set-editor text-definition)    


this code don't work when i tape on backspace, left, top, ...
any idea?



Posted on the users mailing list.