Re: MESSAGE (used in VM) invokes DIALOG_MESSAGE: Can this be suppressed? [message #88365 is a reply to message #88358] |
Wed, 16 April 2014 16:41   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 4/16/14, 1:46 PM, Edward Hyer wrote:
> Hello IDL wizards,
>
> A quick search revealed that
>
>> David Fanning said: Ugh, I *hate* MESSAGE
>
> Clearly MESSAGE is a bad habit, but I used it for a long time, and so
> it's tough to weed out. The trouble is that when I run code
> interactively, which is most frequent, it works pretty much exactly
> how I want it to.
>
> However, when the code is compiled and run non-interactively, the
> behavior of MESSAGE changes. Specifically, instead of printing to
> STDOUT or STDERR, it invokes DIALOG_MESSAGE. There is no
> acknowledgement in the IDL help of this behavior.
>
> I can suppress this behavior, for code with no graphical output, by
> using 'unset DISPLAY' before running IDL. But that trick doesn't work
> for routines that make graphics.
>
> Is there some other trick to get MESSAGE to behave? MESSAGE has lots
> of keyword options, but none appear to be related. Again, there is no
> acknowledgement in the help of the DIALOG_MESSAGE behavior.
>
> --Edward H.
>
I did not know this. Some investigation reveals that "message,
/informational" does just output to stdout, but without /INFORMATIONAL,
it goes to MESSAGE_DIALOG.
Although, I'm wondering why this matters to you, though? If you have
output from MESSAGE coming up, you have errors in your code. Surely, you
want to crash cleanly with an error message that you can see and fix
your bug, right?
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|
|
|