lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Running external programs like 'fop' from lmi


From: Evgeniy Tarassov
Subject: Re: [lmi] Running external programs like 'fop' from lmi
Date: Thu, 14 Jun 2007 00:06:25 +0200

On 6/13/07, Greg Chicares <address@hidden> wrote:

Fixed so that it lights up when there's a problem, and doesn't
when there isn't.

IMHO this is a great improvement from the point of view of UI.

The only two tiny notes I have:
1) The line "Exit code <N> from command 'XXX'" gets lost -- IMHO
better start with it the command directly on the first line, then on
the second line output the error code, and after that list output (out
and err). To summarize I would change:
File: system_command_wx.cpp
        std::ostringstream oss;
-        assemble_console_lines(oss, output, "Output:");
-        assemble_console_lines(oss, errors, "Errors:");
-        oss
-            << "Exit code "
-            << exit_code
-            << " from command '"
+        oss << "Command: "
            << command_line
-            << "'."
+            << std::endl
+            << "Return code: "
+            << exit_code
+            << std::endl
            ;
+        assemble_console_lines(oss, output, "Output:");
+        assemble_console_lines(oss, errors, "Errors:");
        wxMessageBox
            (oss.str()
            ,"Problem executing command"

2) When the error output is too large the message box won't fit on the
screen (vertically), as a result 'Ok' button is invisible and user
could guess and type <Enter>, or close the dialog via small button or
via <escape>. This could be fixed by using a custom dialog window with
scrollbars when needed. It could also go into wx -- a change that
would either add a flag wxSHOW_SCROLLBARS, or add scrollbars
automatically when needed.

Note: I was testing it on a linux box, so there could be some
discrepancies with the windows version.

But 'echo Hello' runs silently. You never see any output,

I wonder, what is going on when a string quote is not matched, like in:
$ echo "
(note a single double-quote, not closed)
In a normal command-line interpreter will prompt on the next line for
the rext of the command and wait for user input. 'Test system command'
does not show any error message for such a command.
Such an exotic example is nothing to be taken serious.
After experimenting with 'fop -fo "<file>" -pdf "<pdf>' (note the
absent final double-quote) it seems that such a double-quote is
automatically added, or simply ignored, so it should not be an issue.

--
Best wishes,
Evgeniy Tarassov




reply via email to

[Prev in Thread] Current Thread [Next in Thread]