Question

I have a Silverlight 4 app that contains a Canvas, which in turn contains a Storyboard resource (named sb1).

In C#, I can get to the storyboard resource by executing

Storyboard sb = (Storyboard)canvas.Resources["sb1"];

When I try to do the equivalent in ruby:

sb = canvas.Resources["sb1"]

I get a System.ArgumentException with the message

Key must be a Type or a String.

By itself, canvas.resources evaluates in ruby to System.Windows.ResourceDictionary so I expect it work like a dictionary...

Can someone point out what I am doing wrong here? I vaguely remember that there is a difference between a CLR string and a Ruby string. Is that what happens here?

I am using IronRuby 1.1.3.0 on .NET 4.0.30319.235 with VS2010.

Was it helpful?

Solution

I found the answer here:

Add to_clr_string to the ruby code

I knew it was something simple. :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top