I’m using win32gdk v3.10/2 on win2k. I need to call external programs on occasion and I use gSystem->Exec(). The problem is that root windows don’t update until after the Exec() call returns. Is there a way around this? Valeriy’s explaination on the RootTalk page explains why the old win32 version would do this for free. I’m wondering if there is a way I can do it (e.g. spawn a thread and periodcally fire gSystem->ProcessEvents() or something similar - I’m willing to “pay”)
Depends on what you want to exec, you can call "start your_executable"
for example, I use very often :
gSystem->Exec(“start winhlp32 yourhelpfile.hlp”);
it doesn’t block…
Hope it helps,
This is helpful: My external program creates a file when its done and I can force root to process gui events while my external program is busy:
if (!gSystem->AccessPathName("doneFile")) break;
...read and process doneFile...This works fine EXCEPT when I try this from within a TExec(): If I try this trick from within a TExec() and I move the window that MyProg creates over the root window, root does NOT repaint itself. Is there a way around this? Thanks
recently we comitted mods which shoud fix this problem.
Try CVS version. Report us if problem persist.
just FYI: TSocket, TMonitor classes are now fully functional under
win32gdk. Check hserv.C, hserv2.C, hclient.C examples.
I tried CVS version of root today. This fixes my problem…almost: When I use the trick from my last post from within a TExec the following happens: A bunch of thick vertical lines appear on the embedded canvas (a TH1F - lines completely within TFrame box) the moment I reposition MyProg’s window the first time. If I click the mouse on the embedded canvas, these dark vertical lines go away the repainting occurs as it should. I have often wanted to programatically “click” on the canvas, but have not figure out how.
One other thing: the version of root from CVS feels a little slower than 3.10/2: The TShutter animation is definately slower with the CVS version.
I will be looking into TSocket/TMonitor possibilities… Thanks!
I do not see slowdown effect. Nevertheless I increased
"GUI refresh timer" interval from 50 to 100 ms. That would help.
Thanks. Regards. Valeriy