Re: [racket] Questions about the Canvas

2012-06-13 Thread Hillary Ryan
Thank you very much. That clears everything right up. -Hillary On Wed, Jun 13, 2012 at 4:11 PM, Stephen Bloch wrote: > > On Jun 13, 2012, at 3:16 PM, Hillary Ryan wrote: > > > Why does this work? > > (define canvas (new canvas% [parent window] [paint-callback (lambda > (canvas dc) (draw canvas d

Re: [racket] Questions about the Canvas

2012-06-13 Thread Matthias Felleisen
On Jun 13, 2012, at 3:16 PM, Hillary Ryan wrote: > I have a bunch (two dozen) of little objects that I would like to be able to > draw on one canvas. At the moment I am passing each object the drawing > context which comes from the canvas, letting the object draw itself and then > moving onto

Re: [racket] Questions about the Canvas

2012-06-13 Thread Stephen Bloch
On Jun 13, 2012, at 3:16 PM, Hillary Ryan wrote: > Why does this work? > (define canvas (new canvas% [parent window] [paint-callback (lambda (canvas > dc) (draw canvas dc))])) > > But this doesn't > (define canvas (new canvas% [parent window] [paint-callback (draw canvas > dc)])) > > It seem

[racket] Questions about the Canvas

2012-06-13 Thread Hillary Ryan
Hello, I have been working on a racket GUI recently. So far it's been wonderfully smooth sailing, especially compared to Java. I had a couple of questions about the canvas object. Any help would be wonderful. Many Thanks, Hillary Questions: 1) Why does this work? (define canvas (new canvas% [par