Re: [ROOT] TControlBar

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Tue May 23 2000 - 20:54:30 MEST


Hi Ingo, 

On Tue, 23 May 2000 15:15:38 +0200 Ingo Strauch <strauch@toots.physik.rwth-aachen.de> wrote:
> Hi rooters!
> 
> I tried the example of a control bar menu from the tutorials web page. But
> there is an obvious mistake: you can't have a statement like
> 
> bar.AddButton("Close Bar",   "gROOT.Reset("a")","Close ControlBar");
>                                           ^^^
>                                           |||
> 

This brings back memories of another message to roottalk ... 

Remember you _have to_ escape quotes in a string, for it to have the
meaning of a quote, and not a string delimiter. Hence, you should
probably do:

  bar.AddButton("Close Bar",   "gROOT.Reset(\"a\")","Close ControlBar");
                                            ^^ ^^
                                            || ||
  
> The double quotes are treated as the string delimiter...
> A working alternative would be to use "bar.Delete()" instead.

Incidently, "bar.Delete()" doesn't work either. Try "delete bar". 

Cheers

Christian  -----------------------------------------------------------
Holm Christensen                             Phone:  (+45) 35 35 96 91 
  Sankt Hansgade 23, 1. th.                  Office: (+45) 353  25 305 
  DK-2200 Copenhagen N                       Web:    www.nbi.dk/~cholm    
  Denmark                                    Email:       cholm@nbi.dk



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET