[plt-scheme] move-to in refresh

From: Mike T. Machenry (dskippy at ccs.neu.edu)
Date: Thu Aug 5 13:31:59 EDT 2004

Is it not allowed to call move-to from within refresh? This program hangs on 
the call to move-to.

(require
 (lib "class.ss")
 (lib "mred.ss" "mred"))

(define aligned-pasteboard%
  (class pasteboard%
    (inherit move-to)
    (rename [super-refresh refresh])
    (define/override (refresh x y w h d-c)
      (super-refresh x y (max w 0) (max h 0) d-c)
      (move-to s4 0 1))
    (super-new)))

(define f (new frame% (label "f") (width 400) (height 400)))
(define e (new pasteboard%))
(define c (new editor-canvas% (parent f) (editor e)))
(define ap (new aligned-pasteboard%))
(define es (new editor-snip% (editor ap)))
(define s4 (make-object string-snip% "a4"))
(send ap insert s4)
(send f show #t)
(send e insert es)

-mike


Posted on the users mailing list.