[plt-scheme] MrEd: creating an inactive child

From: Robert Bruce Findler (robby at cs.uchicago.edu)
Date: Wed Dec 4 08:03:04 EST 2002

You could queue a callback to the original eventspace (probably a good
idea anyways if you have more than one thread doing this updating):

(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])
     (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)))))


Posted on the users mailing list.