Dear Rooters,
I created a few macros that I use on various root files to plot some histograms. I created a small main function in each source file so that I can make a program out of it or run from inside root.
The main function is inside an #ifndef CINT, instanciates a TApplication and then runs it.
I would like to make it so that when I run the macro as a program, the program exits when I close one of the canvases that are created.
I tried canv->Connect(“CloseWindow()”, “TCanvas”, canv, “gApplication->Terminate()”);
But I got the following error:
Error in TQObject::CheckConnectArgs: signal TCanvas::CloseWindow() does not exist
How can I do this?
I have attached a bit of source that shows what I do.
Greetz, Roel
CanvasClose.C (741 Bytes)