[racket] Puzzled
The following program shows a slider.
Why does the slider stop working, when I uncomment the display line?
#lang racket
(require racket/gui)
(define integer-slider%
(class* slider% ()
(super-new)
(inherit get-value)
(define down? #f)
(define/override (on-subwindow-event receiver event)
(begin0
(super on-subwindow-event receiver event)
; (display (get-value)) (display " ")
))))
(define frame (new frame% [label "Example: How to use real-slider%"]))
(define real-slider
(new integer-slider%
[parent frame] [label "x:"]
[min-value 1] [max-value 100] [init-value 50]))
(send frame show #t)
--
Jens Axel Søgaard