Re: -textvariable & Tcl_Eval
From: Michael Schlenker (schlenk_at_uni-oldenburg.de)
Date: 08/08/04
- Next message: Michael Schlenker: "Re: Update sorted list."
- Previous message: Barry Kauler: "Re: Newbie question about curly braces"
- In reply to: garyether: "-textvariable & Tcl_Eval"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 08 Aug 2004 16:38:05 +0200
garyether wrote:
> 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
do it.
Michael
- Next message: Michael Schlenker: "Re: Update sorted list."
- Previous message: Barry Kauler: "Re: Newbie question about curly braces"
- In reply to: garyether: "-textvariable & Tcl_Eval"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|