[plt-scheme] Question about callbacks

From: Yuri Niyazov (yuricake at yahoo.com)
Date: Sun Dec 8 03:48:49 EST 2002

Hello all, newbie here, please forgive.

Having the following problem: figuring out how the windowing system works. 
Used the examples to do the following:

(define frame (instantiate frame% ("Drawing Example") (width 300) (height 300)))
(define canvas (instantiate canvas% (frame) (paint-callback mypaint) ) )

and in mypaint I do all sorts of device context stuff.

So, I haven't been able to figure out how to install a "close" callback - that is, when someone
hits alt-f4 on that screen in windows. Is this not possible, or am I missing something completely
obvious? I haven't been able to figure out how exit:insert-on-callback works, but it doesn't seem
to be what I need, because if I understand it correctly, it works when you exit out the
application, not when you hit close on a frame.


Posted on the users mailing list.