Re: [ROOT] Freeing Up Canvas in Loop?

From: Jon Gans (gans@star.physics.yale.edu)
Date: Tue Jun 20 2000 - 20:17:33 MEST


Thanks, it works.

However, there is no way to return to the calling macro without
re-frezzing the canvas?

 jon


On Tue, 20 Jun 2000, Rene Brun wrote:

> Hi Jon,
> You should call gSystem->ProcessEvents() in your loop.
> You can find some inspiration from TPad::WaitPrimitive. see the code
> and specs at URL:
> 
>   http://root.cern.ch/root/html/src/TPad.cxx.html#TPad:WaitPrimitive
> 
> You can also use a TTimer, see:
> 
>   http://root.cern.ch/root/html/TTimer.html
> 
> Rene Brun
> 
> 
> 
> Jon Gans wrote:
> > 
> > Rene,
> > Painting isn't the problem. Once it is painted the Menu Bar is Greyed
> > out and you cannot inspect the items on the canvas. I would like to be
> > able to edit the canvas (and historgrams) while the main macro is still
> > running.
> > Thanks again
> >  jon
> > 
> > On Tue, 20 Jun 2000, Rene Brun wrote:
> > 
> > > Hi Jon,
> > > call TCanvas::Update in your loop to force the canvas to be paint.
> > >
> > > By default, the canvas is paint when a <CR> is typed (normal command mode)
> > > or when TCanvas::Update is called.
> > >
> > > Rene Brun
> > >
> > > Jon Gans wrote:
> > > >
> > > > I have a menu system that takes input from cin inside a while loop. This
> > > > macro calls other functions that draw canvases. However, after the canvas
> > > > is drawn, since the calling macro is still in the loop, the canvas are
> > > > frozen.
> > > >
> > > > Is there some semaphore I can overide to make these canvas active while
> > > > the calling macro is waiting for more input?
> > > >
> > > > Thanks
> > > > jon
> 

______________________________________________________________________________

Jonathan Gans		                             Home: (203) 789 - 8029
Yale University                         Office (305 WNSL): (203) 432 - 5637
Physics Department                               Cellular: (203) 676 - 9963  
PO BOX 208120                                         Fax: (516) 213 - 4967    
New Haven, CT 06520-8120     	                     http://www.jongans.com



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:28 MET