But I noticed it yesterday, there’s a new SVN revision out there.
Lot’s of changes to the DLR, which can affect stuff people may be
working on. You may want to get latest and merge your changes.
I assume this is a result of syncing up IronPython and IronRuby’s DLR
projects… I’m sure it’s been asked before, but why /isn’t/ the DLR
hosted separately?
We have talked about hosting DLR separately and still not sure where we
will land. Hosting it separately makes it harder to pull down matching
sources of the DLR and IronRuby (or DLR and IronPython). So its not
clear whether it would be a net positive or a net negative to host it
separately.
I have made a test app with XAML + WPF + IronRuby event handlers
(IronRuby revision 76). The code of the Ruby-part (EventManager.rb) is
below. Due to lack of other working mechanisms of connecting the
Ruby-methods to the WPF-events, I ended up in passing the widget
reference to Ruby in a global variable and then using the closure-syntax
to connect the delegates on Ruby-side.
All three events work ok and the App runs, but only with following event
names:
CLR name of the event Name of event seen in IronRuby
“Click” “click”
“Loaded” “loaded”
“MouseEnter” “MouseEnter”
Notice that whereas “Click” and “Loaded” mapped to their lower-case
equivalents, the “MouseEnter” event connected only if it was written in
the original capital form “MouseEnter” on IronRuby-side. The most
logical alternative “mouseEnter” caused MethodMissing. I suspect such
inconsistency in the name-mapping cannot be intentional.