Hi Rooters, I couldn't figure out how to get started with an interpreted GUI on WinNT. Neither the macro given on roottalk (copied below) (http://root.cern.ch/cgi-bin/print_hit_bold.pl/root/roottalk/roottalk98/0388 .html?GUI#first_hit) by (Radovan Chytracek (Radovan.Chytracek@cern.ch) Fri, 13 Mar 1998 01:05:07 +0100 (MET) ) nor the macrofied version of Fons Rademakers GUI example (newgui.html) work in my version (root 2.21/08 on WinNT4/SP3). The problem seems to be that no global gClient object exists. When I try the first line of the macro guitest0() on the command line (right after a fresh start of root) I get: root [1] TGMainFrame *mf = new TGMainFrame(gClient->GetRoot(),50,50) Error: illegal pointer to class object gClient 0x0 0 FILE:C:\TEMP\60 LINE:1 *** Interpreter error recovered *** if I try to create a gClient object by hand, I get a segfault with error mess: root [0] TGClient *gClient = new TGClient() Warning in <TGMimeTypes::TGMimeTypes>: error opening mime type file C:\root/icon s/root.mimes Error in <TGClient::GetFontByName>: couldn't retrieve font -adobe-helvetica-medi um-r-*-*-12-*-*-*-*-*-iso8859-1 nor backup font "fixed" Error in <TGClient::GetFontByName>: couldn't retrieve font -adobe-helvetica-bold -r-*-*-12-*-*-*-*-*-iso8859-1 nor backup font "fixed" Error in <TGClient::GetFontByName>: couldn't retrieve font -adobe-helvetica-medi um-r-*-*-10-*-*-*-*-*-iso8859-1 nor backup font "fixed" Error in <TGClient::GetFontByName>: couldn't retrieve font -adobe-courier-medium -r-*-*-12-*-*-*-*-*-iso8859-1 nor backup font "fixed" I'd like to note that everything else seems to work OK (i.e the COMPILED test examples hello.cxx and Aclock.cxx work fine). There has been an answer to the same question on rootalk (http://root.cern.ch/root/roottalk/roottalk98/0954.html) by Fons Rademakers (Thu, 04 Jun 1998 20:04:32 +0200 ) and says: "Since I've been getting quite a number of questions on how to use the new ROOT GUI classes via the interpreter, I've made an example showing an InputDialog class that can be used to prompt for either strings, integers and floats. ... Get the file ftp://root.cern.ch/root/dialogs.C. It contains detailed instructions on how to use it." I was not able to find that test file. Where did it go??? Is there ANY docu for using GUI under windows at all?? (the guitest.cxx in the test direcory does NOT work and is therefore disabled.) Also the link "Graphical User Interface (Win32) Classes "on the "Root Class Categories" page of the ROOT website is apparently broken (accidentally?). Any help to get started with a CINT gui on WinNT would be deeply appreciated..... Thanks in advance Peter file://--------------------------------------------------------------------- ------------------------------------------------ #include <iostream.h> int guitest0(){ TGMainFrame *rMFrm = new TGMainFrame(gClient->GetRoot(), 50, 50); TGCompositeFrame *rCFrm = new TGCompositeFrame(rMFrm, 50, 50, kHorizontalFrame|kSunkenFrame ); TGButton *rPBut = new TGPictureButton( rMFrm, gClient->GetPicture("beeravatar.xpm"), "rAction();", 1); rPBut->Associate(rMFrm); rCFrm->AddFrame(rPBut, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY)); rMFrm->AddFrame(rCFrm, new TGLayoutHints(kLHintsExpandX|kLHintsExpandY)); rMFrm->SetWindowName("First Rado's ROOT GUI"); rMFrm->MapSubwindows(); rMFrm->Resize(rMFrm->GetDefaultSize()); rMFrm->MapWindow(); return 0; } void rAction() { cout << "Pushed..." << endl; } **************************************************************************** Peter Lipa, PhD e-mail: lipa@nsma.arizona.edu Arizona Research Labs - Neural Systems, Memory and Aging University of Arizona Life Sciences North Bldg, Room 384; Phone: (520) 626-3101 Tucson, AZ 85724-5115 Fax: (520) 626-2618 ****************************************************************************
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:33 MET