Here is a small macro that behaves differently when running it with two different versions of root (5.10 and 5.13/06 on Linux SL4). to run it, Show() in a root session.
With root5.10 if a keyboard is pressed, the loop is executed without any actions. The mouse
interrupts it (click or move) and with another key pressed it kept on going. CRTL/C stops the macro.
With root5.13 a keyboard pressed executs the loop just once.
Is there something wrong with my root versions ? if not,
what is the ‘normal’ behavior and what can I do to always have the first behavior.
Cheers
Olivier
here is the function because for some reasons (I don’t know why) the ‘add an Attachment’ button does not work in my firefox2 …
void Show()
{
TLine line; line.SetLineWidth(2); TMarker mark; mark.SetMarkerStyle(23);
TCanvas *c = new TCanvas();
Int_t refresh = 0;
while( 1 ) { // loop on events
if ( refresh % 100 == 0 )
{ refresh = 0 ; gPad->Clear(); }
refresh++;
line.DrawLine(0,0,refresh*0.01,0.5);
gPad->Update(); TObject *obj = gPad->WaitPrimitive();
if ( gROOT->IsInterrupted() ) { cout << "loop stopped " << endl; break; }
}
}