[plt-scheme] Exiting a scheme program through GUI

From: Greg Hendershott (greghendershott at gmail.com)
Date: Wed May 12 00:23:55 EDT 2010

I think the less-aggressive way is to send the frame object an on-exit message:

(define the-frame (new frame%))

...

(send the-frame on-exit)

On Tue, May 11, 2010 at 12:09 PM, Matt Jadud <jadudm at gmail.com> wrote:
> On Tue, May 11, 2010 at 7:00 AM, David Moberg <kaddkaka at gmail.com> wrote:
>> My code so far for the buttun is only:
>>
>> (define quit-item (new menu-item% [parent file-menu] [label "Quit"]
>>                             (callback (lambda (button event)
>>           'Q))))
>
> What about (exit)?
>
>               (callback (lambda (b e)
>                           (exit)))
>
> It's a bit aggressive, but it should terminate the program.
>
> Cheers,
> Matt
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.