Re: action in TButton

Fons Rademakers (Fons.Rademakers@cern.ch)
Thu, 07 May 1998 19:20:32 +0200


Hi Judith,

this problem has been fixed in the latest version of ROOT 2.00/05.

Cheers, Fons.

Judith Katzy wrote:
>
> Dear rooties,
>
> I have a macro tbut.C that I want to execute as a TButton action, but I
> get error messages. The macro is:
>
> #include <stdio.h>
> int tbut(Int_t ilayer)
> {
> printf("ilayer= %d\n",ilayer);
> return 0;
> }
>
> The DialogCanvas with button is:
>
> {
> TDialogCanvas *dialog = new TDialogCanvas("dialog","",700,780);
> TButton *but = new TButton("test",".x tbut.C(0)",.05,.8,.95,.88);
> but->Draw();
> }
>
> When I click on the test button I get the error message:
>
> Error: file tbut.C(0) can not open
>
> But I can execute the macro on the commandline via
> ROOT> .x tbut.C(0)
>
> What's going wrong? I thought I could do it (according to ROOT talk
> July 17, 1997).
>
> thanks for any help
> Judith

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910