Login  Register

Re: How can I specify the bindings when evaluating an expression?

Posted by Nicolai Hess on Feb 04, 2015; 11:02pm
URL: https://forum.world.st/How-can-I-specify-the-bindings-when-evaluating-an-expression-tp4794352p4803789.html



2015-02-04 23:07 GMT+01:00 Sean P. DeNigris <[hidden email]>:
Nicolai Hess wrote
> Dictionary newFrom:{ WorkspaceVariable key:#a value:3.
> WorkspaceVariable key:#b value:4}

Thanks! That works great :)

n.b. in Pharo 3.0, just replace the WorkspaceVariables with regular
associations:
  Smalltalk compiler evaluate:'a+b'
    notifying: (Dictionary newFrom: { #a -> 3. #b -> 4 })
    logged: nil

That's interesting. We lost this feature in 40097
(13584 Forward code generation for Globals and Class Vars to meta object)


 



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/How-can-I-specify-the-bindings-when-evaluating-an-expression-tp4794352p4803777.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.