[racket] draw-point on a Canvas%

From: JasonFruit (jasonfruit at gmail.com)
Date: Tue Jul 27 11:04:59 EDT 2010

I've run into a problem trying to plot a point on a MrEd canvas% using
draw-point.  I simplified the problem to this:

(module test-ui scheme
  (require (lib "class.ss")
           (lib "mred.ss" "mred")
           (lib "framework.ss" "framework"))
  (provide run
           plot-points)
  (define main-frame (new frame%
                          (parent #f)
                          (height 400)
                          (width 600)
                          (label "Canvas Example")))
  (define test-canvas (new canvas%
                           (parent main-frame)
                           (stretchable-width #t)
                           (stretchable-height #t)))
  (define (run)
    (send main-frame show #t))
  (define (plot-points)
    (define (loop n)
      (cond ((< n 30)
             (send test-canvas draw-point n n)
             (loop (+ n 1)))))
    (loop 1)))

Then, when I do

(run)
(plot-points)

I get:

send: no such method: draw-point for class: canvas%

According to the documentation at
http://www.cs.rice.edu/CS/PLT/packages/53/doc/mred/node140.htm#SECTION00560000000000000000,
it looks like that method should exist.

Am I missing newer documentation?

Thanks,

Jason R. Fruit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100727/24c0f2ef/attachment.html>

Posted on the users mailing list.