Skip to main content
Home Forums Silverlight Programming Programming with JavaScript Execution JScript in SilverlIght Application using DLR
6 replies. Latest Post by darrin_ru on July 22, 2009.
(0)
darrin_ru
Member
0 points
5 Posts
06-15-2009 10:33 AM |
Hello!I try to make scriptable application using Silverleght DLR. When I try execute JScript code witch cotains two or more lines of code, execution only first line. For example:I had Compiled SL application written on С#. Main page contains Label named "lblMessage" and Button with Click event handler.
After execution Label.Text will be equal "First line of code" string.
Why ignored second line of code ?
Thank you.
Jonathan...
All-Star
24939 points
2,425 Posts
06-19-2009 6:26 AM |
Hi Darrin_ru,
Please replace your code with mine and have a test.
string script = "lblMessage.Text = 'First line of code';\r\n" + "lblMessage.Text = 'Second line of code';"; ScriptSource scriptSource = scriptEngine.CreateScriptSourceFromString(script, Microsoft.Scripting.SourceCodeKind.Statements);
It works on Silverlight 3.
Best regards,
Jonathan
06-22-2009 1:50 AM |
Thanks! It's work.
coolio
369 points
114 Posts
07-18-2009 7:11 AM |
Hey Jonathan.
I thought the Managed JScript for DLR was dropped? How does this work for SL3?
07-21-2009 5:58 AM |
It's work with SL3 correctly.
07-21-2009 6:04 AM |
Yes, but how? Where do I find the JScript binaries. The current DLR package (http://sdlsdk.codeplex.com/) only contains the IronRuby and IronPython languages.
- koen
07-22-2009 2:33 AM |
I use libs from 0.4.0 sdkhttp://sdlsdk.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=17839As I understood It's final Microsift release of Managed JScript.