[plt-scheme] pasteboard insert/delete

From: Robert Bruce Findler (robby at cs.uchicago.edu)
Date: Sat Nov 16 20:01:14 EST 2002

You need to release-snip before you can add it back in.


At Sat, 16 Nov 2002 18:03:44 -0500, "Mike T. Machenry" wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 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)
> Thanks,
> -mike

Posted on the users mailing list.