Re: Radovan example

From: Radovan Chytracek (Radovan.Chytracek@cern.ch)
Date: Wed Mar 18 1998 - 15:08:12 MET


On Wed, 18 Mar 1998, Produit Nicolas wrote:

> Trying to run Radovan Example just with cut and paste from Email too
> root give:
> 
> ....
> 
> root [21] char *StrDialog(char *desc = "Change String Dialog", char
> *defval = "Text")
> Limitation: Can not define body of function in tempfile
> FILE:/tmp/01779vaa LINE:1
> 
> Then when end of function definition:
> 
> end with '}'> }
> Error: No symbol desc in current scope  FILE:/tmp/01779waa LINE:5
> 
>  *** Break *** segmentation violation
> 
>  *** Break *** keyboard interrupt
> 
> 
> What does the error message mean?
> 
> -- 
>               Nicolas Produit
> 
Hi,

       when using new GUI with scripting you should follow the rules:

1. At the beginning of your macro define all components you will use
   to ensure their visibility in global scope

2. After that define functions for creating widget sets and processing
   function

So if you want to use the example do the following:

1. Cut&Paste text between ** Cut Here ** lines into file called
   StrDialog.C

2. start ROOT as:

   root StrDialog.C                          or

   root StrDialog.C("My String", "My Value") or

   root
   #include <iostream.h>
   .L StrDialog.C
   StrDialog("My String", "My Value");

3. The way we use such a dialog window in our macros is:

   - paste the text at the beginning of your macro in which you want to
     call the dialog

   - call the StrDialog(..., ...) function somewhere in the macro


Hope this helps.

Happy ROOTGUIing

            Radovan



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:31 MET