Re: What is the minimum number of lines to update a gui window without user clicking a button



On Sat, 10 Aug 2013 09:32:58 -0400
"L. D. James" <ljames apollo3 com> wrote:
[snip]
As far as realworld applications, most applications have some element
of processing and outputting a status to the user without the user
having to sit at the concole and constantly click buttons.  I really
appreciate your input and suggestions.  But I believe you're
misunderstanding the question.  I realize buttons and user input is
an important part of applications.  However, at present, I would just
like to be able to output notifications to my clients into a gui
window without my application having to be hung until they come to
the computer and click a button.  The purpose of what I'm trying to
do is allow the user to know at which stage the application has
progressed, and to be able to report to me any messages, errors
status updates that I present.  As far as the VPN connection, if my
program is waiting for an internet connection, it will state that.
When it has the connection, without the user having to come back and
tell the program to continue, it will just update, internet
connection established, the remote host is currently off line... will
try again in 5 minutes.  The  present console program eventually
says, vpn connection established now configuring the local routing.

I have many applications (or c++ routines) to do things such as that.
They all output to a black screen.  They frighten my customers.  I
hope to find a simple way of outputting the status to a friendly gui
window.

I don't mean to sound ungrateful with my reply, but I'm hoping that
I'm clarifying what I'm trying to do, and that it does have some
merit.

Your posts are no doubt highly meritorious but I am afraid they are not
offering much clarification.  You would probably make your point better
if you shortened your posts by roughly an order of magnitude.  However,
after cutting through the dense undergrowth, I still think you have
failed to understand how programs using event loops work.  If the
program is not just running a single batch of instructions, it has to
have a loop in there somewhere, which is blocking until there is
something to process.  The simplest loop for your console program would
involve blocking on select() or poll(), for which purpose presumably
you must have a file descriptor to poll on.  In that case, as I said,
you can do the same with Glib::signal_io().connect().  Or maybe you are
polling using timeouts, in which case the equivalent for gtkmm is
Glib::signal_timeout().connect().

Why not get to the heart of the matter, and post a short compilable
console program, cut down from the ones which you appear to have written
for monitoring VPNs, but of no more than 50 lines, and we can tell you
how to do the same using a graphical interface.

Chris


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