[plt-scheme] MrEd: creating an inactive child
Robert Bruce Findler writes:
> (define evtspc (make-eventspace))
>
> (define frame
> (parameterize ((current-eventspace evtspc))
> (make-object frame% "Test")))
>
> (define m1 (make-object message% "1" frame))
> (define m2 (make-object message% "2" frame))
> (define m3 (make-object message% "3" frame))
> (send frame show #t)
>
> (define m4 #f)
> (define (test)
> (parameterize ([current-eventspace evtspc])
> (queue-callback
> (lambda ()
> (send frame begin-container-sequence)
> (set! m4 (make-object message% "4" frame))
> (sleep 2)
> (send frame delete-child m4)
> (send frame change-children
> (lambda (children) (list m1 m2 m4)))
> (send frame end-container-sequence)))))
In X, this program ends up blanking out the "1" for 2 seconds every
time test is called. But not in Windows, hmm....
--dougo at ccs.neu.edu