[plt-scheme] Scrollbar in version 370

From: Rainer Gross (rainer_gross at gmx.net)
Date: Wed May 30 22:22:37 EDT 2007


Since I've updated to the latest plt version I have trouble with a  
canvas% implementation. I use the on-scroll method to update some  
values, but since version 370 my update method (on-scroll) is called  
only after I release the scrollbar. Anyway it is called many times as  
it should have been called while dragging the bar around.

The following code allows to reproduce the problem. On v360 the value  
in the upper text-field is updated while dragging the scrollbar on  
v370 it is updated when releasing the scrollbar.

I am running DrScheme on Tiger.

Can I expect that the v360 behavior will return?



; example code

(define my-canvas%
   (class canvas%
     (override on-scroll)
      (callback #f))
     (define on-scroll (lambda (e) (if callback (callback (send e get- 

(define times-called 0)

(let* ((frm (new frame% (label "Test Window")))
        (fld (new text-field% (parent frm) (label "scrollvalue")))
        (cvs (new my-canvas%
                  (min-width 500)
                  (min-height 500)
                  (parent frm)
                  (stretchable-width #f)
                  (style '(vscroll))
                  (callback (lambda (x)
                              (set! times-called (+ 1 times-called))
                              (send fld set-value (string-append  
(number->string times-called) ":" (number->string x)))))))
   (send frm show #t)
   (send cvs init-manual-scrollbars 200 200 100 100 0 0))

Posted on the users mailing list.