Hi Yongzhao, Please read the documentation of dialogs.C. In particular, you will read; // This file contains the class InputDialog. // An InputDialog object prompts for an input string using a simple // dialog box. The InputDialog class is also a good example of how // to use the ROOT GUI classes via the interpreter. Since interpreted // classes can not call virtual functions via base class pointers, all // GUI objects are used by composition instead of by inheritance. // // This file contains also some utility functions that use // the InputDialog class to either get a string, integer or // floating point number. There are also two functions showing // how to use the file open and save dialogs. The utility functions are: // // const char *OpenFileDialog() // const char *SaveFileDialog() // const char *GetStringDialog(const char *prompt, const char *defval) // Int_t GetIntegerDialog(const char *prompt, Int_t defval) // Float_t GetFloatDialog(const char *prompt, Float_t defval) // // To use the InputDialog class and the utility functions you just // have to load the dialogs.C file as follows: // .L dialogs.C // // Now you can use them like: // { // const char *file = OpenFileDialog(); // Int_t run = GetIntegerDialog("Give run number:", 0); // Int_t event = GetIntegerDialog("Give event number:", 0); // printf("analyse run %d, event %d from file %s\n", run ,event, file); // } Rene Brun Zhou wrote: > > Hi, ROOTer's, > I got a wrong message when I run a program dialogs.C in the directory > tutorials as: > > root [0] .x dialogs.C > Error: No symbol dialogs() in current scope FILE: LINE:0 > *** Interpreter error recovered *** > > I don't know what is wrong. > Thanks for someone help me. > Best, > ZYZ > > ------ > Yongzhao Zhou, KLOE, LNF, INFN, Italy > Tel:39-06-94032696 Fax:39-06-94032427
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:40 MET