Hi Valeri,
"Fine, Valeri" <fine_at_bnl.gov> writes:
> I seems to me I have to re-post the portion of my C++ example:
>
> public:
> MyFitButton(const TGWindow *p, TGHotString *s, Int_t id=-1
> , GContext_t norm =GetDefaultGC()()
> , FontStruct_t font=GetDefaultFontStruct()
> , UInt_t option = kRaisedFrame|kDoubleBorder)
> : TGTextButton (p, s, id, norm, font, options )
> , fGraph(0), fF1(0) {}
>
I now have:
class MyFitButton : public TGTextButton {
private:
TGraph *fGraph;
TF1 *fF1;
public:
MyFitButton(const TGWindow *p, TGHotString *s)
: TGTextButton (p, s )
, fGraph(0), fF1(0) {}
void SetGraph(TGraph *g) { fGraph = g;} void SetFun1(TF1 *f) { fF1 = f;}
TGraph *Graph() const {return fGraph;} TF1 *Fun1() const { return fF1;}
ClassDef(MyFitButton,1);
};
.x RogersGUI.C++
segfaults if the following line is uncommented:
fFitButton = new MyFitButton(fHframe2, (TGHotString*)"&Fit");
Cheers,
Roger
Received on Sun Jan 28 2007 - 18:20:25 CET
This archive was generated by hypermail 2.2.0 : Sun Jan 28 2007 - 23:50:01 CET