From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Problems with the "mwindows" switch Date: Fri, 29 May 2015 16:24:37 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <00836c9e-9ed0-4638-9d0b-0b3cd4e07c65@googlegroups.com> <37731869-bfb2-47b1-b0cf-7e4e806019c1@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1432934678 7719 24.196.82.226 (29 May 2015 21:24:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 29 May 2015 21:24:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.giganews.com comp.lang.ada:193387 Date: 2015-05-29T16:24:37-05:00 List-Id: wrote in message news:37731869-bfb2-47b1-b0cf-7e4e806019c1@googlegroups.com... On Thursday, May 28, 2015 at 6:19:09 PM UTC-4, Randy Brukardt wrote: >> >> Of course there is, you just need some support from the runtime. >> >The ability of which I was referring was the ability to have a program that >can dynamically > select whether to use the inherited console (i.e. if you run the > executable from a command > prompt, to output the text to the existing console) or to open a new > window. A GUI app > that allocates its own console but is ran from the command prompt will > open a new window > to print the text, which is normally not the desired behavior. That's harmless, though, since the primary reason to use Text_IO in the first place is for error/crash reporting. Where that goes is not particularly relevant. And if you really mean to write to a console in the GUI program, a separate window is usually a benefit, as it is much more similar to the way the rest of the app works. The one thing that I do want in some cases is to be able to capture the output (that is, redirect the output to a file), and that works on some of my machines but not others (even with the separate window, and differing even for the same Windows version). I'm not sure why that is, but it's clearly possible to redirect the output that is going to a separate console window. > Making a CUI app will work right when spawned from the command line, but > will always > open its own console when spawned by double clicking the icon, even if > there is no output, > which is also normally not the desired behavior. Agreed, although the problem there is that CUI apps should never be run by clicking on icons. That's fairly easy to do, too, don't register the silly icon to the desktop or the start menu -- it's not designed to be run there. (No one navigates to a directory to click something.) So while I understand what you are thinking is missing, it seems pretty unnecessary to me. Randy.