Hmmm
I have a problem then:
The programme waits on a line for a server to send a buffer, and while
that happens it obviously doesnt come by the gSystem->ProcessEvents()
lines, which means that I can interact with the canvas, but it is quite
annoying with sometimes very long breaks. Any Idea to get around that?
Ivan
On Mon, 7 May 2001, Fons Rademakers wrote:
> Hi Ivan,
>
> synchronous timers are only processed when the program processes
> events via gSystem->ProcessEvents(). So in your case there is a
> chicken and the egg problem. Best is just to regularly in your
> canvas update loop to call gSystem->ProcessEvents() or if you
> want it to be timer driven use an a-synch timer TProcessEventTimer
> (via TSystem.h) and for its use check TTreePlayer.cxx (see:
> http://root.cern.ch/lxr/source/treeplayer/src/TTreePlayer.cxx#1095)
>
>
> Cheers, Fons.
>
>
> Ivan Storgaard Vogelius wrote:
> >
> > Hi!
> > I want to create a TTimer to update interactions with canvas
> > regularly. I tried to do the following:
> > TTimer *timer= new TTimer(500, kTRUE);
> > timer->SetCommand("gSystem->ProcessEvents()");
> > timer->TurnOn();
> >
> > But It causes the programme to crash(in CINT or compiled). How should it
> > be done?
> >
> > Thanks
> > Ivan
>
> --
> Org: CERN, European Laboratory for Particle Physics.
> Mail: 1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
> WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
>
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:44 MET