Maxim,
-Could you indicate what type of problems you faced? -What is the problem that you are trying to solve?
What you show is certainly not a solution to any problem.
If you just want to interact with the window while filling the 
histograms
simply call gSystem->ProcessEvents();
Rene Brun
On Mon, 24 Apr 
2006, 
Maxim Nikulin wrote:
> Hi,
>
> I faced several problems during my attempts to use the TPad::WaitPrimitive() 
> method and I think these issues should be mentioned in the documentation. 
> I've written a script demonstrating a possible solution, I hope it will be 
> useful for someone.
>
> {
>   h = new TH1F ("h", "h", 10, 0, 1);
>   h->Draw();
>   t = new TText(0.5, 0.5, "Text");
>   t->SetName("t");  // otherwise it has empty name ""
>                     // and WaitPrimitive() returns immediately
>                     // TText is not the only class having the empty
>                     // name by default
>   t->Draw();
>   for (Int_t i = 0; i < 10; ++i)
>   {
>      h->Fill(i/10. + 0.01);
>      c1->Modified();
>      c1->Update();
>      c1->WaitPrimitive();
>      c1->HandleInput(kNoEvent, 0, 0); // next call of WaitPrimitive()
>                                       // often receives the same event
>                                       // so no pause happens
>      cout << i << endl;
>   }
> }
>
> Another point is that the canvas can be closed while WaitPrimitive() is 
> executed. Probably the code should handle this case.
>
> I don't think input event processing significantly varies for different 
> window managers, but just to be precise. I use Black box window manager, ROOT 
> 5.10/00 and Fedora Core 2 on a Pentium 4 box.
>
>
Received on Mon Apr 24 2006 - 08:19:07 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET