[racket] a few questions while reading about racket/draw libray (http://docs.racket-lang.org/draw/overview.html)

From: J G Cho (gcho at fundingmatters.com)
Date: Fri Sep 14 13:12:11 EDT 2012

Q1. Possible syntax error?

Code that generates Racketeers, ho! (with reflections) near the bottom
of the tutorial, goes like this:

(define-values (tw th)
  (let-values ([(tw th 1 2)
                (send dc get-text-extent str the-font)])
    (values (inexact->exact (ceiling tw))
            (inexact->exact (ceiling th)))))

It gives me an error (5.3 on Win 7). I changed 1 2 to to x y.

(define-values (tw th)
  (let-values ([(tw th x y) ....

Q2. It's too late to change syntax from (send obj method) to [obj
method], isn't it?

Q3. Is there some general rules or convention w.r.t. (new obj% ) vs (make-obj) ?

jGc

Posted on the users mailing list.