Jimmy Schementi
2009-Jul-16  20:56 UTC
[Ironruby-core] [Code Review] IronRuby Tutorial in Silverlight
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:
-
http://github.com/jschementi/ironruby/commit/ffef26a418310ace70af782b0fd51d4900344da4#diff-5
   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)
-
http://github.com/jschementi/ironruby/commit/ffef26a418310ace70af782b0fd51d4900344da4#diff-1
   o
Merlin/Main/Hosts/SilverLight/Microsoft.Scripting.SilverLight/BrowserVirtualFilesystem.cs
- Make BrowserVirtualFilesytem.NormalizePath virtual so children can override it
-
http://github.com/jschementi/ironruby/commit/ffef26a418310ace70af782b0fd51d4900344da4#diff-2
   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:
-
http://github.com/jschementi/ironruby/commit/51563a0a4b54f3c2cddb29b8f989e1fc61e9db3b
   o Default to Segoe UI in Silverlight, so fonts look closer to desktop. Fix
newline/whitespace in SL.
-
http://github.com/jschementi/ironruby/commit/4266772b1c098d5f5f875b2c6aa0b1314e16927f
   o Ignore IronRuby.Tests.VS bin folder
-
http://github.com/jschementi/ironruby/commit/ffef26a418310ace70af782b0fd51d4900344da4
   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
-
http://github.com/jschementi/ironruby/commit/de4dd18760df2d4f3f41b326449fcf605ab1bde3
    o Build Silverlight.sln aliases (bsd/bsr), get Chiron building, and remove
JS/TestConsoleHost from Silverlight.sln