[racket] drawing on canvas what's wrong with my code?

From: 김태윤 (kty1104 at gmail.com)
Date: Wed Oct 27 00:56:41 EDT 2010

drawing on canvas what's wrong with my code?

I coded as follow and run it but nothing apear.
could sombody tell me what's wrong with my code?

#lang scheme/gui
(require 2htdp/image)
(define pic dc<%>)

(define f (instantiate frame% ("map editor")))
(define mcan%
  (class canvas%

    (override on-event)

    (define on-event (λ (e)
                       (send msg set-label
                             (string-append (number->string (send e get-x)) " "
                                            (number->string (send e get-y))))))
    (super-instantiate ())))

(define mcan (new mcan% (parent f) (min-width 400) (min-height 400)))
(send (send mcan get-dc) draw-bitmap (make-object bitmap% "town.png"
'png) 16 16)

(define msg (instantiate message% ("nothing so far" f)))
(send f show #t)


Posted on the users mailing list.