[plt-scheme] pasteboard insert/delete

From: Mike T. Machenry (dskippy at ccs.neu.edu)
Date: Sat Nov 16 18:03:44 EST 2002

I am having a problem hiding snips in a pasteboard. The class I am using
is derived from pasteboard% with snip% fields. I am attempting to hide
and show snips by deleting the an inserting them back again but the
second insert doesn't seem to be working. The bellow program demonstrate
this problem. The snip is supposed to reappear after the second call to
insert but it does not. Is there a proper way to do this?

;; Graphical Language

(define f (instantiate frame% () (width 400) (height 400) (label "f")))
(define pb (instantiate pasteboard% ()))
(define ec (instantiate editor-canvas% () (editor pb) (parent f)))
(define t (instantiate text% ()))
(define es (instantiate editor-snip% () (editor t)))
(send f show #t)
(send pb insert es #f)
(send pb delete es)
(send pb insert es #f)


Posted on the users mailing list.