[racket] gui application needs to perform operation upon closing of a window

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed May 22 19:06:18 EDT 2013

Here we go: 

#lang racket/gui

(define my-frame%
  (class frame%
    (define/augment (on-close)
      (displayln "closing now"))))

(define frame
  (new my-frame% [label "on closing"][width 300][height 200]))

(send frame show #t)

On May 22, 2013, at 6:55 PM, Zelah Hutchinson wrote:

> From the documentation I gather that I need to augment the on-close method. I do not understand how to do this. Can someone show me a tiny example of how to perform an operation when a window is closed? Thank you.
> ____________________________________________________________
> FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
> Check it out at http://www.inbox.com/marineaquarium
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Posted on the users mailing list.