GUI executable creating an annoying command line window

68 views
Skip to first unread message

Philip Benade

unread,
May 26, 2020, 5:00:01 AM5/26/20
to Racket Users
Hi All

I have been trying to create a simple GUI with the racket/gui library. For the most part it works but alongside my GUI it also creates a command line window. You can see a screenshot of this in the attached picture. I found this discussion when I searched for a solution: https://groups.google.com/forum/#!topic/racket-users/QmvqWtm1x28 In that case it was happening because there were things that did not return void. In my case however it is not printing anything, there isn't even any white space.

I am using the "Create Executable" option from the "Racket" heading in Dr.Racket's menu. I set the Type to be "Distribution (to install on other machines)" and the Base to "GRacket" and keep the "Embed DLLs in the executable" check box checked. Is there some setting or something I can change to make this window to go away?

I have attached my program's .rtk file in case anyone needs it to see what I'm doing wrong.

Regards
Philip
racket-gui.PNG
work-timer.rkt

Laurent

unread,
May 26, 2020, 5:47:28 AM5/26/20
to Philip Benade, Racket Users
Does it change anything if you use #lang racket/gui instead of #lang racket (require racket/gui)?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/3387d77b-e9a6-4777-a46b-ac897596702e%40googlegroups.com.

Alex Harsanyi

unread,
May 26, 2020, 5:50:58 AM5/26/20
to Racket Users

I cannot reproduce this.  If I create the executable from the command line using "raco exe --gui work-timer.rkt", or from DrRacket specifying GRacket as the "base", the console window does not show up. 

If I create the executable using "raco exe work-timer.rkt" or by specifying "Racket" as the base in DrRacket, the console window shows up, but this is expected.

I am using Racket 7.7 (BC, not the Chez version).

Alex.

Philip Benade

unread,
May 26, 2020, 7:05:23 AM5/26/20
to Racket Users
Hi Laurent

Unfortunately no, nothing changes.

Regards
Philip


On Tuesday, 26 May 2020 11:47:28 UTC+2, Laurent wrote:
Does it change anything if you use #lang racket/gui instead of #lang racket (require racket/gui)?

On Tue, May 26, 2020 at 10:00 AM Philip Benade <philip...@gmail.com> wrote:
Hi All

I have been trying to create a simple GUI with the racket/gui library. For the most part it works but alongside my GUI it also creates a command line window. You can see a screenshot of this in the attached picture. I found this discussion when I searched for a solution: https://groups.google.com/forum/#!topic/racket-users/QmvqWtm1x28 In that case it was happening because there were things that did not return void. In my case however it is not printing anything, there isn't even any white space.

I am using the "Create Executable" option from the "Racket" heading in Dr.Racket's menu. I set the Type to be "Distribution (to install on other machines)" and the Base to "GRacket" and keep the "Embed DLLs in the executable" check box checked. Is there some setting or something I can change to make this window to go away?

I have attached my program's .rtk file in case anyone needs it to see what I'm doing wrong.

Regards
Philip

--
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...@googlegroups.com.

Philip Benade

unread,
May 26, 2020, 7:09:05 AM5/26/20
to Racket Users
Hi Alex

I managed to get it working. Updating Dr.Racket to 7.7 did the trick. I should have thought of it sooner, but I became so wrapped up in looking for the problem in my code I didn't think of it.

Thank you for your help.

Regards
Philip

Andre Garzia

unread,
May 31, 2020, 8:00:57 PM5/31/20
to Racket Users
I noticed a similar behavior if I left any dangling "display" or "write" in the code, a terminal window would open with those messages in it. Is this what might be happening to you?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/40774e6e-7b89-4cd2-a21a-f1a936783c94%40googlegroups.com.


--

Philip Benade

unread,
Jun 1, 2020, 2:46:55 AM6/1/20
to Racket Users
Hi Andre

This was 100% caused by using an outdated version of DrRacket. In my case the terminal window was just empty, no messages. It seems that If any of your code produces an output in the REPL window of DrRacket that will cause the terminal window to show.

Regards
Philip
To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages