[Ironruby-core] Hosting the DLR and passing data to scripts

Tomas Matousek Tomas.Matousek at microsoft.com
Wed Nov 7 22:54:22 EST 2007

We’re going to improve hosting API in DLR next month – there will be several major changes and many minor ones. IronRuby will also plug better to DLR due to these changes. For the time being, use only globals (via RubyEngine.CurrentEngine.ExecutionContext.GlobalVariables dictionary) for passing data from and to Ruby scripts.


From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Restrepo
Sent: Wednesday, November 07, 2007 3:44 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Hosting the DLR and passing data to scripts

I've been playing with the DLR hosting interfaces and running ruby code this way; it's a really, really nifty feature that I'm already loving!

I can see a lot of cool scenarios this will be useful, such as providing a good way to provide custom scripting support on applications and so on.

I have had some problems, however, in particularly trying to connect the host with the scripts being executed inside the DLR. In my infinite ignorance, I assume you would be able to use Script.SetVariable() (or one of the longer, but equal alternatives to it) to introduce global variables into the scope before executing or evaluating a script, but for the life of me I can't seem to get it to work.

Am I just completely of the mark? or is it just not working at this time?

Tomas Restrepo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071107/5494fc83/attachment-0001.html 

More information about the Ironruby-core mailing list