You need create a destructor to delete in a correct way the TGFrame
(the main window).
You notice that the order to delete the widges is so important.
Here you have a example:
JMXSpecMainFrame::~JMXSpecMainFrame()
{
// Delete all created widgets.
delete fSunkenLayout; delete fFrameLayout0Exp;
delete fFrameLayout1L; delete fFrameLayout1R; delete fFrameLayout2;
delete fFrameLayout3; delete fFrameLayout4; delete fGroupLayout1;
delete fMenuBarLayout; delete fMenuBarItemLayout; delete
fMenuBarHelpLayout;
delete fMenuFile; delete fMenuTools; delete fMenuHelp;
delete fMenuBar;
delete fTBextnum;
delete fTExtnum;
delete fLfilelabel; delete fLfile; delete fLextnum;
delete fRN; delete fRS; delete fRC; delete fRT; delete fRY;
delete fRLin; delete fRLogX; delete fRLogY;
delete fDrawButton;
delete fErrorBuGr; delete fAxisBuGr;
delete fFileFrame; delete fExtFrame;
delete fErrorFrame; delete fAxisFrame;
delete fErrorGrFrame; delete fAxisGrFrame;
delete fSunkenFrame;
}
Best wishes,
Andrés
> Hi,
>
> I'm working with ROOT GUI and when a TGFrame is closed (like in the
case
> of TGMsgBox, by clicking the OK button) I often get a new blank
canvas
> on the screen plus I get this message:
>
> Root >
> *** Break *** segmentation violation
> Root >
> *** Break *** segmentation violation
>
> Is this a "feature" of ROOT GUI? Could you give me ideas on what to
do
> (and what to be careful about) to make sure that when I don't get
> segmentation violations or get a new canvas or get hanged main
windows
> when a dialog box exits? Seems there isn't much docs on this from
the
> ROOT web site or anywhere.
>
> Best regards,
> Allister
>
> /////////////////////////////////////////////////////////////////////
///////
> Allister Levi Sanchez
> High Energy Physics Laboratory
> Niigata University
> Japan
> allister@hep.sc.niigata-u.ac.jp
> /////////////////////////////////////////////////////////////////////
///////
>
>
>
--
********************************
Andres Russu Berlanga
andres.russu@uv.es
GACE-ICMUV-UV
Phone:+34 963983676
********************************
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:10 MET