Screenshot!
What this is, is a small dll which you can add to any .net winforms project. When run, it brings up the interactive console, and you can poke around with your app. It's running live inside your process, so anything your app can do, it can do. I thought this was kind of cool :-)
How to get it going:
- Download and build IronRuby by following the instructions on IronRuby.net - I built this against IronRuby SVN revision 153. As of RIGHT NOW the current revision is 154 which doesn't build.
- Download the Embedded IronRuby project from the following URL - you can use SVN to check it out directly from there. (I'm assuming familiarity with SVN in the interests of brevity)
http://code.google.com/p/orion-edwards-examples/source/browse/#svn/trunk/dnug/ironruby-presentation/EmbedIronRuby - Open the EmbeddedIronRuby/EmbeddedIronRuby.sln file in visual studio, and remove/add reference so that it references
IronRuby.dll
,Microsoft.Scripting.dll
,Microsoft.Scripting.Core.dll
, andIronRuby.Libraries.dll
. These will be in the IronRubybuild\debug
folder that you will have built in step 1. - Compile!
- For some reason, when you compile, Visual Studio will only copy
IronRuby.dll
,Microsoft.Scripting.dll
andMicrosoft.Scripting.Core.dll
to thebin\debug
directory. It also needsIronRuby.Libraries.dll
in that directory (or in the GAC) to run, otherwise you get a stack overflow in the internal IronRuby code when you run it.
The joys of alpha software I guess :-) - Run the app and click the button!
EmbeddedRubyConsole.dll
, and in your app do this:
new EmbeddedRubyConsole.RubyConsoleForm().Show();
Credit: Some of the 'plumbing' code (the TextBoxWriter
and TextWriterStream
) come from the excellent IronEditor application. Full credit to and copyright on those files to Ben Hall. Thanks!
No comments:
Post a Comment