[Ironruby-core] ScriptableMember and Silverlight
Jimmy.Schementi at microsoft.com
Thu Aug 14 15:44:38 EDT 2008
Yeah, I’m well aware of the issue with not being able to use [ScriptableMember] for IronRuby. =(
If in your HTML you have some variable:
Then in your Ruby script you can access it:
This is not directly possible because of not having attribute support. Curt might have more input into whether this will be fixed in the future.
However, if you’re not opposed to hacky solutions, attach Ruby to a JS event (HtmlElement#attach_event), and when you want data from Ruby fire the JS event and Ruby could write the data to the DOM (a hidden div, perhaps?). Ugh, that sucks, but it’s what we’ve got today.
I’d suggest trying the first option, and we’ll keep you posted on making Ruby objects scriptable from JS.
On 8/14/08 11:59 AM, "Sean Clark Hess" <seanhess at gmail.com> wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core