[Ironruby-core] [Code Review] IronRuby Tutorial in Silverlight
Jimmy.Schementi at microsoft.com
Thu Jul 16 16:56:24 EDT 2009
Get's the IronRuby tutorial working in Silverlight. It currently starts and works through the beginnings of the tutorials. Formatted text isn't there yet, scrolling is a little wonkey (including scroll wheel doesn't work), there are some alignment issue, and not all the tutorial content works in Silverlight for good reasons (WinForms, WPF, FileSystemWatcher, etc) and not so good reasons (thread doesn't work simply because I didn't copy the thread library, for example). Also the SL version loads completely different XAML files than the desktop; they will be merged shorly.
Notable Ruby and SL changes:
o Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyEncoding.cs - comparing System.Text.UTF8Encoding to itself in Silverlight fails. Compare to ToString instead (maybe better to compare the WebName, but this works for now)
o Merlin/Main/Hosts/SilverLight/Microsoft.Scripting.SilverLight/BrowserVirtualFilesystem.cs - Make BrowserVirtualFilesytem.NormalizePath virtual so children can override it
o Merlin/Main/Hosts/SilverLight/Microsoft.Scripting.SilverLight/DynamicEngine.cs - Make sure console is loaded after the ScriptEngine
And here are the actual commit-diffs:
o Default to Segoe UI in Silverlight, so fonts look closer to desktop. Fix newline/whitespace in SL.
o Ignore IronRuby.Tests.VS bin folder
o first crack at the ironruby tutorial in Silverlight:
- design/TutorialSL ... needs to be merged with original
- scripts for launching sl and wpf versions
- refactor wpf_tutorial.rb into gui_tutorial.rb, and then wpf_tutorial.rb and sl_tutorial.rb launch in the respective technology
- various tweaks to get SL working -- but doesn't have rich text yet
- adds erb.rb and stringio.rb to Libs so SL can get them.
- Tweak Chiron so it won't copy binaries to testsuites dir if not present
- Tweak to RubyEncoding to utf-8 works in SL
- Make sure console is loaded after the ScriptEngine
- Make BrowserVirtualFilesytem.NormalizePath virtual so children can override it
o Build Silverlight.sln aliases (bsd/bsr), get Chiron building, and remove JS/TestConsoleHost from Silverlight.sln
More information about the Ironruby-core