Thanks,
Chris
P.S. Here's my code in case your curious:
The Dialog:
{
Int_t runnum;
FILE *runfile=fopen("/home/sample/replay/root/c_run.dat","r");
char *runstr=new char[25];
fscanf(runfile,"%d",&runnum);
fclose(runfile);
sprintf(runstr,"Current Run is: %d",runnum);
TDialogCanvas *runw=new TDialogCanvas("runwindow","Current Run
Information",300,50);
TButton *runb=new TButton("Change Run",".X changerun.C(runt)",0,0,1,.5);
TPaveText *runt=new TPaveText(0,.5,1,1);
runt->AddText(runstr);
runt->Draw();
runb->Draw();
runw->SetEditable(kIsNotEditable);
runw->cd();
runb->cd();
}
The Button's Macro:
void changerun(TPaveText *r)
{
gROOT->Reset();
Int_t runnum;
char *runstr=new char[25];
printf("\nPlease enter the four digit run #: ");
do {
fscanf(stdin," %d",&runnum);
} while (!((runnum>999)&&(runnum<10000)));
sprintf(runstr,"Current Run is: %d",runnum);
r->Clear();
r->AddText(runstr);
}
...... ..... .... ... .. . . . . . . . .
Christopher M. Eppstein Lloyd 215
MSC #492 626.395.1387
Caltech
Pasadena, Ca 91126-0492
http://www.ugcs.caltech.edu/~eppstein/home/home.html
...... ..... .... ... .. . . . . . . . .