Re: Can TButton be used in copiled mode ?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Oct 12 1999 - 16:10:50 MEST


Yongzhao,

With TButton, you can only execute messages that can be understood by
the interpreter. If you have a normal C function, this function must be
know
to the interpreter (this means be in the dictionnary).
You must declare your compiled C function in your LinkDef.h file
with a statement like
#pragma link C function exitDrawAll;

You can also invoke a compiled C++ member function if the corresponding
class
is part of the dicytionary. Invoking a C++ function is typically done
by using a C++ global object or a static member function.

Rene Brun

Yongzhao Zhou wrote:
> 
> Dear Rooters,
> I tried the examples but() in the Class Description of TButton on web as a
> macro via the CINT and got successful, but got a failure in compiled mode
> (in a program) and got an error message:
>     Error: No symbol exitDrawAll() in current scope
>     FILE:/var/tmp/aaaa12267 LINE:1
>     *** Interpreter error recovered ***
> And same error message was happened to my program. My codes are:
>     char *actBut="exitAllDraw()"
>     TButton *but3 = new TButton("Exit Draw All",actBut,.72,.02,.95,.060);
> or
>     TButton *but3 = new TButton("Exit Draw All","",.72,.02,.95,.060);
>     but3->SetMethod("exitDrawAll()");
> Is that meanning of that TButton just can be used in CINT and can not be
> used in the compiled mode?
> Thanks for some help.
> Best,
> ZYZ
> ------
> Yongzhao Zhou, KLOE, LNF, INFN, Italy
> Tel:39-06-94032696 Fax:39-06-94032427



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:40 MET