On Tue, Sep 05, 2017 at 05:07:41PM -0400, James wrote:
I'm trying out Rackterm for the purpose of running commands put together from a GUI but it looks like the thread is crashing as soon as I try to create a terminal canvas. Is it something I am not doing right or is there a bug? I am able to run rackterm/xterm without error and that contains very similar code.
Here's my code: #lang racket (require racket/gui rackterm/private/terminal-canvas ) (define frame (new frame% [label "Example"] (width 800) (height 800) )) (send frame show #t) (define my-term (new terminal-canvas% [parent frame] [font-size 14] [font-name "Courier"] [term-var "rackterm"] [command-and-args '("ls -lh")] [set-title-callback (lambda (title) (send frame set-label title))] [horiz-margin 2] [vert-margin 2] )) The terminal window appears and then immediately closes with the following error message: "The evaluation thread is no longer running, so no evaluation can take place until the next execution. Exited successfully."
Well, this is caused by my not having actually cleaned up the code for it to be used in any sort of general way, rather than specifically only by my one xterm (hence terminal canvas is still in the private directory). But there is a `handle-subproc-ended` method that I put a TODO in to make it configurable, but currently just kills the canvas, because usually you want an xterm to close when the shell inside it exits. But you could make a subclass that overrides that method, or even better, improve my bad code and send a pull request. Or eventually I'll fix things up and release them properly. Also '("ls -lh") should be '("ls" "-lh"). -- 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.