[plt-scheme] middle ground between MrEd and gui/draw teachpacks?

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Wed Feb 9 13:03:55 EST 2005

>You could probably add a simplified canvas to "gui.ss". The simplified
>canvas could accept a callback to handle clicks, and an initial image,
>and it could support an operation for installing a new image. Then you
>could use the "image.ss" teachpack instead of the "draw.ss" teachpack
>to generate the image.

Okay, I see that. I'm a little unclear as to how to get an image into
a bitmap (I know how to send a bitmap to a canvas). An image is a
cache-image-snip%, right? Can I send it a get-bitmap message, or do I
have to convince it it's not an image somehow?

>I think you could use `get-mouse-event' to flush old events (i.e., call
>it in a loop until you get #f).

Works fine. Thank you. --PR



Posted on the users mailing list.