I can confirm the behavior, which is visible under both *SL and Racket and all 
methods for creating executable. 

For a workaround, use this for now: 

#lang racket/gui

(require 2htdp/universe 2htdp/image)

(define (render ws) ws)

(define (halt ws) #t)

(big-bang (rectangle 600 400 'solid 'gold)
          (to-draw render)
          (stop-when halt render))

(yield (make-semaphore))

-- Matthias




On Aug 4, 2014, at 11:39 AM, Kevin Forchione <lyss...@gmail.com> wrote:

> When you run big-bang in Dr Racket and the stop-when evaluates true the 
> window remains open to display the final image (when specified) and must be 
> manually closed by the user. However, running the racket executable created 
> for distribution closes the window and returns you to terminal as soon as 
> stop-when is returns true, thus bringing the execution to a jarring halt 
> without adequately displaying the final image (it’s hard to tell whether it 
> displays because the action is so quick). This appears to be the case for 
> both Windows and Mac installers. Is this a bug or how the process is designed 
> to work?
> 
> Below is a link to some very basic racket code and a mac installer to 
> demonstrate the effect:
> 
> https://dl.dropboxusercontent.com/u/4859392/test5.rkt
> 
> https://dl.dropboxusercontent.com/u/4859392/test5.dmg
> 
> If this is how it’s designed to work, then stop-when, for executable 
> distribution is probably not a desired handler for what I’m intending, as I 
> seldom want the window to close automatically when big-bang terminates, but 
> would prefer the user to close the window manually. I can probably achieve 
> this with some finagling of the world state, but the two different behaviors 
> between Dr Racket and distribution was surprising.
> 
> —Kevin
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users


____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to