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