[plt-scheme] pasteboard insert/delete

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Nov 16 18:51:57 EST 2002

At Sat, 16 Nov 2002 18:03:44 -0500, "Mike T. Machenry" wrote:
> 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?

Probably you need to use `release-snip' instead of `delete'.

I'll fix the docs for `delete', etc. The short explanation is that
`delete' tends to put the snip into the undo stack, so the snip remains
owned by the pasteboard. The second insert then has no effect because
the snip is already owned.

Matthew



Posted on the users mailing list.