I have never worked with a canvas% before (I have worked with a lot of other 
racket gui stuff), so I have no idea what’s going on, but watch what happens 
with this:
#lang racket
(require racket/gui/base)
(define frame (new frame%
                   [label "Example"]
                   [width 300]
                   [height 300]))
(define canvas
  (new canvas% [parent frame]))
(define dc (send canvas get-dc))
(send frame show #t)
(sleep 1)
(send dc draw-rectangle 30 20 10 40)

And even better, with this:
#lang racket
(require racket/gui/base)
(define frame (new frame%
                   [label "Example"]
                   [width 300]
                   [height 300]))
(define canvas
  (new canvas% [parent frame]))
(define dc (send canvas get-dc))
(send frame show #t)
(sleep 1)
(send dc draw-rectangle 30 20 10 40)
(sleep 2)


On Jun 2, 2015, at 3:17 PM, John Smith <rashreportl...@gmail.com> wrote:

> Alexis,
> Thank you for the speedy answer.
> I think I correctly implemented what you described. See attached.
> In the new code, no error is thrown but the rectangle is not drawn.
> Reorderings of displaying the window and drawing the rectangle appear to have 
> no effect.
> The only way I can get anything to show up is if I enter it in the REPL once 
> the code is executed.
> 
> Any idea what might be causing this?
> 
> -Luke
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <graphics-3.rkt>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to