For Programmers: Free Programming Magazines  


Home > Archive > Tcl > April 2005 > Tcl/Tk GUI and pthread









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Tcl/Tk GUI and pthread
randy1200

2005-04-20, 4:00 pm

I have a Tcl/Tk GUI.

The GUI needs to be able to accept updates to entry boxes once a second
from a pthread running in a C library.

Any pointers on how to get started with this? I tried Tcl_SetVar(), then
calling an update back in the Tcl/Tk code, but I'm missing too many
updates. Sometimes, as long as 30 seconds between updates appearing in the
entry box on the GUI.

Thanks,
Randy

Ian Bell

2005-04-21, 4:00 pm

randy1200 wrote:

> I have a Tcl/Tk GUI.
>
> The GUI needs to be able to accept updates to entry boxes once a second
> from a pthread running in a C library.
>

Maybe I am missing something, but an entry is primarily intended for user
input - why do you need to update it once a second? Are you sure it is an
entry you should be updating?

Ian
lvirden@gmail.com

2005-04-22, 4:01 pm


According to Ian Bell <ruffrecords@yahoo.com>:
:randy1200 wrote:
:> The GUI needs to be able to accept updates to entry boxes once a second
:> from a pthread running in a C library.
:>
:Maybe I am missing something, but an entry is primarily intended for user
:input - why do you need to update it once a second? Are you sure it is an
:entry you should be updating?

I sure hope there is not much more than one or maybe at most two
characters in that entry box - because otherwise, by the time someone
tries to type something in the entry box, your pthread once a second update
will have reset it to whatever value it has been using...
--
<URL: http://wiki.tcl.tk/ > MP3 ID tag repair < http://www.fixtunes.com/?C=17038 >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
<URL: mailto:lvirden@gmail.com > <URL: http://www.purl.org/NET/lvirden/ >
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com