[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
  (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


I get:

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

According to the documentation at
it looks like that method should exist.

Am I missing newer documentation?


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.