[racket] Any reason the canvas is still blank?

From: Tomás Coiro (tomcoiro at hotmail.com)
Date: Sun May 19 20:17:12 EDT 2013

#lang racket/gui
(define bitmap (make-parameter #f))
(define dc (make-parameter #f))
(define path (make-parameter #f))

(parameterize* ((bitmap (make-bitmap 500 500 #f))
                (dc (let ((temp (new bitmap-dc% (bitmap (bitmap)))))
                      (send temp set-pen "black" 2 'solid)
                (path (new dc-path%)))
  (define frame (new frame% [min-width (send (bitmap) get-width)]
                     [min-height (send (bitmap) get-height)]
                     [label "test"]))
  (send (path) move-to 50 50)
  (send (path) line-to 250 250)
  (send (dc) draw-path (path))
  (define canvas (new canvas% [parent frame]))
  (send (send canvas get-dc) draw-bitmap (bitmap) 0 0)
  (send frame show #t))

I don't know what i am doing wrong, the bitmap is drawn, if i return it i get the line all fine, the problem is that the frame either doesn't get updated or never tries to draw. Is this a bug in canvas% or am I doing something terribly wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130520/873c4e76/attachment.html>

Posted on the users mailing list.