Re: [Pharo-users] Supply named temporaries to Compiler>>#evaluate:...

2015-02-05 Thread Marcus Denker
> On 04 Feb 2015, at 21:46, Nicolai Hess wrote: > > 2015-02-04 18:48 GMT+01:00 Sean P. DeNigris >: > I want to be able to evaluate a string like '2 + arg1' and supply anObject > for arg1 to the compiler. > > I naively tried: > | aContext | > aContext := thisContex

Re: [Pharo-users] Supply named temporaries to Compiler>>#evaluate:...

2015-02-04 Thread Nicolai Hess
2015-02-04 18:48 GMT+01:00 Sean P. DeNigris : > I want to be able to evaluate a string like '2 + arg1' and supply anObject > for arg1 to the compiler. > > I naively tried: > | aContext | > aContext := thisContext copy > tempNamed: 'arg1' put: 1; > yourself. > Compiler evaluate: '2

[Pharo-users] Supply named temporaries to Compiler>>#evaluate:...

2015-02-04 Thread Sean P. DeNigris
I want to be able to evaluate a string like '2 + arg1' and supply anObject for arg1 to the compiler. I naively tried: | aContext | aContext := thisContext copy tempNamed: 'arg1' put: 1; yourself. Compiler evaluate: '2 + arg1' in: aContext to: nil which didn't even come close to wo