It's a little ugly, but you can change the exit handler:
(exit-handler
 (λ (x) (displayln "Called exit")))

-Philip

On Mon, Apr 17, 2017 at 8:57 PM, Matt Jadud <jad...@gmail.com> wrote:

> Hi all,
>
> I would like to spawn a browser frame, but I'd like it if the frame did
> not terminate the thread when I close it. I'm having a hard time figuring
> out what I should override/augment or catch so that I can spawn the frame
> from within a GUI application, let the user close the frame, and not have
> the whole application terminate.
>
> Cheers,
> Matt
>
> #lang racket
>
> (require browser)
>
> (define really-hyper-frame%
>   (class hyper-frame%
>
>     (super-new)
>
>     (define (on-close)
>       (printf "Closing!")
>       ;; But, how do I prevent the evaluation thread
>       ;; from terminating? For example, if I want to launch
>       ;; a browser frame from interactions in a GUI application?
>       )
>     (augment on-close)
>     ))
>
> ;; I'm aware the example is from the module level, but the same issue
> applies if
> ;; I create the frame as a result of, say, a button% click.
> (new really-hyper-frame%
>      [label "The Frame"]
>      [start-url "https://racket-lang.org/";])
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to