Hi Valeriy, Thanks for your answer but I don't get it (and I don't get the error message). There are two reasons why I need it to work like this: 1) if I don't have a "name" for my mainframe (here its fMain) the whole GUI look is a mess (don't know why). I thinks it's something with this TGLayoutHints things. 2) the example in the ROOT manual 3.05 page 311 does exactly the same (and I suppose it should work) it does: MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h) { // Create a main frame fMain = new TGMainFrame(p,w,h); . // and then I can do things like fMain->AddFrame(... // instead of only AddFrame(... // which also works, but the layout is a mess Cheers Andi On Wednesday 23 July 2003 18:44, Valeriy Onuchin wrote: > Hi Andreas, > > MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h) > { > ... > > is equal to > > MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h) : > TGMainFrame() { > ... > > TGManFrame class doesn't have default constructor, i.e. > TGMainFrame::TGMainFrame() > > Yours compler complains for the same: > "main.c++:29: no matching function for call to `TGMainFrame::TGMainFrame > ()'" > > HTH. Regards. Valeriy > > > Hi ROOTERS, > > > > how come the following works: > > > > MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h) > > > > : TGMainFrame(p, w, h) > > > > { > > > > ... code > > > > } > > > > but the following doesn't: > > > > MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h) > > { > > > > fMain = new TGMainFrame(p, w, h); > > ... code > > > > } > > > > wher fMain is of course in the .h file as: > > > > TGMainFrame *fMain; > > > > I get the following error: > > main.c++: In method `MyMainFrame::MyMainFrame (const TGWindow *, > > unsigned int, unsigned int)': > > main.c++:29: no matching function for call to `TGMainFrame::TGMainFrame > > ()' > > /afs/cern.ch/sw/root/v3.05.04/rh73_gcc2952/root/include/TGFrame.h:369: > > candidates are: > > TGMainFrame::TGMainFrame (const TGWindow *, unsigned int, unsigned int, > > unsigned int = kVerticalFrame) > > /afs/cern.ch/sw/root/v3.05.04/rh73_gcc2952/root/include/TGFrame.h:410: > > TGMainFrame::TGMainFrame (const TGMainFrame &) > > > > > > Thanks in advance > > Andi > > > > ======================================================================= > > Andreas Wildauer > > CERN/EP ATC, mailbox E25310, CH-1211 Geneva 23, Switzerland > > office 40 3-D06 > > email Andreas.Wildauer@cern.ch > > tel +41 22 76 71779 > > ======================================================================= -- ======================================================================= Andreas Wildauer CERN/EP ATC, mailbox E25310, CH-1211 Geneva 23, Switzerland office 40 3-D06 email Andreas.Wildauer@cern.ch tel +41 22 76 71779 =======================================================================
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET