Re: Erratic TInterpreter::GetInterfaceMethod behaviour?

From: Nicholas Devenish <misnomer_at_gmail.com>
Date: Wed, 30 Mar 2011 09:28:02 +0100


Hi,

I understand the problem now, but it seems strange that the LoadMacro reported success when it clearly didn't work. I have now added TApplication, and it is fine.

Is there documentation somewhere for this behaviour? The only references to TRInt/TApplication that I can find in the users guide are in relation to running GUI applications.

Thanks,

Nick

On Tue, Mar 29, 2011 at 9:00 PM, Philippe Canal <pcanal_at_fnal.gov> wrote:
> Hi Nicholas,
>
> Per se it is the intended behavior.   When not constructing a TRint, you
> forgo
> some of its functionality.   One of the functionality is to introduce more
> 'state'
> and initialization than the (intentionally) bare minimum.
>
> In your original example, you try to interpret:
>
> void infid_set_cc2008()\n{\n  cout << \"This works\"<<endl;\n}\n
>
> which requires 'iostream'.   I.e. an alternative (and semantically
> consistent)
> solution is to use:
>
>  thefile << "#include <iostream>\nvoid infid_set_cc2008()\n{\n  cout <<
> \"This works\"<<endl;\n}\n";
>
> Cheers,
> Philippe.
>
>
> On 3/28/11 6:44 AM, Nicholas Devenish wrote:
>>
>> Hi Bertrand,
>>
>> On Mon, Mar 28, 2011 at 11:52 AM, Bertrand Bellenot
>> <Bertrand.Bellenot_at_cern.ch>  wrote:
>>>
>>> For me, adding gROOT->ProcessLine("#include<iostream>"); in your main()
>>> solved the problem. I.e.:
>>
>> Thanks! - this works around the problem and allows me to continue with
>> my work. At a hazardous guess, I can imagine it is something to do
>> with the interpreter not being properly initialised until it is passed
>> a valid command to parse (i.e. initialisation order), though I admit
>> the couple of other items I tried didn't work. Perhaps I should file a
>> savannah report.
>>
>> Nick
>>
>
Received on Wed Mar 30 2011 - 10:28:13 CEST

This archive was generated by hypermail 2.2.0 : Wed Mar 30 2011 - 23:50:01 CEST