# Noone's mentioned it yet

**URL:** <https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183>\
**Category:** IronRuby\
**Created:** [February 15, 2008, 6:07am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183 "2008-02-15T06:07:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [February 15, 2008, 6:07am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183/1 "2008-02-15T06:07:43Z")

</div>

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?

–  
Michael L.  
[Polymath Programmer]  
[http://michaeldotnet.blogspot.com](http://michaeldotnet.blogspot.com)

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [February 15, 2008, 7:16am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183/2 "2008-02-15T07:16:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [February 15, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183/3 "2008-02-15T18:15:02Z")

</div>

Have you tried mouse\_enter?

Tomas

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [February 15, 2008, 9:10am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183/4 "2008-02-15T09:10:22Z")

</div>

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.

Robert B.  
Software architect  
Email: removed\_email\_address@domain.invalid

> **[Home – NAPA](https://www.napa.fi/)**
>
> NAPA provides intelligent solutions for maritime industry: Software, Services and Data Analysis for Ship Design and Operation. We combine naval architecture, shipping and digital expertise to help maritime business make the decisions that matter.

------------------------- EventManager.rb: -------------------------

# Reference the WPF assemblies

require ‘PresentationFramework, Version=3.0.0.0, Culture=neutral,  
PublicKeyToken=31bf3856ad364e35’  
require ‘PresentationCore, Version=3.0.0.0, Culture=neutral,  
PublicKeyToken=31bf3856ad364e35’

SolidColorBrush = System::Windows::Media::SolidColorBrush  
Colors = System::Windows::Media::Colors

module NWS

module COLOURBUTTON

```
class WidgetEventManager
  def initialize(widget)
    widget.click { |sender,args| self.click(sender,args) }

```

# CLR name: Click

```
    widget.loaded { |sender,args| self.loaded(sender) }

```

# CLR name: Loaded

```
    widget.MouseEnter { |sender,args| self.mouse_enter(sender,args)

```

} # CRL name: MouseEnter  
end  
def click(widget, args)  
widget.content = widget.content.to\_s + “X”  
end  
def mouse\_enter(widget, args)  
widget.background = SolidColorBrush.new(Colors.Red)  
end  
def loaded(widget)  
widget.background = SolidColorBrush.new(Colors.Yellow)  
end  
end

end

end

WidgetEventManager.new($widget)

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [February 18, 2008, 8:36am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183/5 "2008-02-18T08:36:35Z")

</div>

Yes I tried, mouse\_enter did not work

Robert B.  
Software architect  
Napa Ltd

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [February 16, 2008, 5:37am UTC](https://www.ruby-forum.com/t/noones-mentioned-it-yet/129183/6 "2008-02-16T05:37:12Z")

</div>

Robert B.:

> CLR name of the event Name of event seen in IronRuby  
> “Click” “click”  
> “Loaded” “loaded”  
> “MouseEnter” “MouseEnter”

Nope. This is definitely a bug in the name mangling. It should be  
mouse\_enter or MouseEnter. Can you open a bug on this one please?

Thanks,  
-John
