[ROOT] How to survive the "gApplication->Terminate(0);"

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Tue Dec 10 2002 - 10:51:58 MET


Hi,
Assume you have an application which internally does :
	new TRint("MyApplication", 0, 0, 0, 0);
	...
	gApplication->Run(kTRUE);
and when the main gui window is deleted it does :
	gApplication->Terminate(0);

My question is ... how can I convince ROOT to survive this ?
The point is that ... the application created Rint, but I want to take
control over it afterwards.

What I would like to do is :
	gApplication->CompletalyIgnoreTerminate();
	delete MainGuiWindow; // it will call gApplication->Terminate(0)
	gApplication->DontIgnoreTerminate();

Well, I could do this now using :
	Bool_t OldReturn = gApplication->ReturnFromRun();
	Bool_t OldDone = gSystem->GetDone();
	gApplication->SetReturnFromRun(kTRUE);
	delete MainGuiWindow;
	gSystem->SetDone(OldDone);
	gApplication->SetReturnFromRun(OldReturn);
unfortunately ... TSystem class does not provide "GetDone" nor "SetDone".

Could you, please introduce something like this into ROOT ?
Best regards,
Jacek.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:23 MET