On Thu, 23 Sep 2004 suaide@if.usp.br wrote:
> Hello all
>
> Is there any way of adding commands (like .L or similar)
> to root? I mean, I am creating a stand alone application that
> has a command line interface and I would like to create a few
> commands. I can create functions but I feel it would be easier
> to have something like
>
> .hac filename
>
> instead of
>
> hac("filename")
Hi Alex,
you could inherit from TRint and overwrite the method
YourClass::ProcessLine(const char *line, Bool_t sync,int *err )
{
if(line starts with ".hac"){
myaction();
} else {
TRint::ProcessLine(line, sync, err);
}
}
Cheers
Gero
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET