Hello, I built the following class, and when I just put inside the destructor: delete this, this generates a segmentation fault ? Why ? It seems to be connected to the TGString !! Thank for your help. FitPad::FitPad (const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h, UInt_t options, DataSet *d, Display *plot) : TGTransientFrame (p, main, w, h, options) { data = d ; graph = plot ; fFitPad = new TGCompositeFrame (this, 50, 50, kHorizontalFrame) ; AddFrame (fFitPad, new TGLayoutHints (kLHintsTop, 0, 0, 0, 0)) ; fFitParam0 = new TGCompositeFrame (fFitPad, 50, 50, kVerticalFrame | kSunkenFrame) ;// | kLHintsExpandX) ; fFitPad->AddFrame (fFitParam0, new TGLayoutHints (kLHintsTop)) ;// (kLHintsLeft | kLHintsExpandX, 10, 10, 5, 5)) ; // fFitParam = new TGGroupFrame (fFitParam0, "Fit Parameters", kVerticalFrame) ; // fFitParam0->AddFrame (fFitParam, new TGLayoutHints (kLHintsLeft, 5, 5, 1, 1)) ; fStringSplit = new TGString ("Splitting: ") ; fStringDSplit = new TGString (" D Splitting: ") ; fActionPad = new TGCompositeFrame (fFitPad, 50, 50, kVerticalFrame) ; fFitPad->AddFrame (fActionPad, new TGLayoutHints (kLHintsRight | kLHintsCenterY, 2, 2, 2, 2)) ; fActionPad->Resize (fActionPad->GetDefaultSize ()) ; fPlotButton = new TGTextButton (fActionPad, "&Plot", M_FIT_PLOT) ; fActionPad->AddFrame (fPlotButton, new TGLayoutHints (kLHintsTop | kLHintsExpandX | kLHintsCenterY, 5, 5, 5, 5)) ; fPlotButton->Resize (fPlotButton->GetDefaultWidth (), GetDefaultHeight ()) ; fPlotButton->Associate (this) ; fSaveButton = new TGTextButton (fActionPad, "&Save", M_FIT_SAVE) ; fActionPad->AddFrame (fSaveButton, new TGLayoutHints (kLHintsTop | kLHintsExpandX | kLHintsCenterY, 5, 5, 5, 5)) ; fSaveButton->Resize (fSaveButton->GetDefaultWidth (), GetDefaultHeight ()) ; fSaveButton->Associate (this) ; fCloseButton = new TGTextButton (fActionPad, "&Close", M_FIT_CLOSE) ; fActionPad -> AddFrame (fCloseButton, new TGLayoutHints (kLHintsTop | kLHintsExpandX | kLHintsCenterY, 5, 5, 5, 5)) ; fCloseButton -> Resize (fCloseButton->GetDefaultWidth (), GetDefaultHeight ()) ; fCloseButton -> Associate (this) ; SetWindowName ("Line Fitting") ; MapSubwindows () ; Resize (GetDefaultSize ()) ; MapWindow () ; fClient -> WaitFor (this) ; } -- --- ============================================================================== Patrick DUPRE | | Tel: (33 4) 76-88-78-51 CNRS/LCMI (GHMFL) | | Fax: (33 4) 76-85-56-10 25 Rue des Martyrs, BP 166 | | http://eschyle.polycnrs-gre.fr F-38042 GRENOBLE Cedex 09 | | email: pdupre@polycnrs-gre.fr ==============================================================================
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:24 MET