[plt-scheme] Generating standalone GUI programs

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Feb 3 15:47:48 EST 2006

At Fri, 3 Feb 2006 21:46:17 +0100, Geza Lakner MD wrote:
> (module test mzscheme
>   (require (lib "mred.ss" "mred"))
>   (message-box "title" "this is a little message" #f '(yes-no caution))) 
> 
> 
> In the DrScheme interaction box, by typing in '(require test)', the
> program executes. If I append to the test.scm file this '(require
> test)' row, the program becomes even runnable via the "Run" menu
> command or toolbox icon - but this source file change conflicts with
> the "mzc --gui-exe" standalone code generation, because the source
> contains more than one expression beyond the compulsory (module)
> construct.

--gui-exe wants a module to `require' it, instead of just loading it.
So you don't need the `(require test)' line.

To get the same behavior in DrScheme, use the "(module ...)" language.

Matthew



Posted on the users mailing list.