Re: -textvariable & Tcl_Eval
Date: Sun, 08 Aug 2004 16:38:05 +0200
> Hi all,
> I have a C function setting a TCL global variable which is tied to an
> entry widget using -textvariable. Problem is though globals value is
> updated in C and then TCL using Tcl_SetVar - the entry widget doesnt
> change its display unless i do two things: call - Tcl_Eval(inter, "update
> idletasks"); and then move the mouse around over the window, otherwise it
> doesnt change on screen at all.
> I dont want to have to do either of the last two steps is their a way to
> achieve this?
Display is only updated if Tcl enters the event loop and processes its
idle events. So you have to change the var and enter the Tcl event loop.
One way to do this is calling update idletasks...
But maybe you could explain what you try to achieve with your C
function, and we could give you some hints what would be the best way to
- Re: One interp, many threads
... In the case of, say, a GPS receiver, we have to show ... GPS thread updates some variables via the C interface. ... do not lend themselves to Tk event loops or Tcl access. ... call the Tk event loop to keep the display snappy. ...
- Re: the loop event
... After your main thread has initialized Tcl. ... script which should be inserted into the event loop before running the ... LPASYNCEVENT ae; ... If you plan on turning Tcl's event loop into an alertable queue to ...
- Handling asynchronous hardware events
... I'd like to use TCL to control my devices over the GPIB/IEEE488.1 serial bus. ... For example I'm not allowed to call stdio functions in this handler, so typically one needs to send a message with SetEventon Windows and checks with WaitForEventin the main loop to handle the request. ... Can someone provide me with a simple example, what functions have to be called in the interrupt handler to queue an event, unblock the event loop, and how to register event handling on the Tcl level. ...
- Re: Handling asynchronous hardware events
... I'd like to use TCL (and especially its event loop) to control my ... In C I can install an asynchronous handler, ... I'd like to use Tcl and events instead, e.g. fire an event and provide ... event, unblock the event loop, and how to register event handling on ...
- Re: Tcl Evangelism