setting property values

Nov 13, 2009 at 2:14 PM

Hello everyone,

if you take a look at the following script, you see it creating a Form, setting the title of the form and showing it.

            JintEngine jint = new JintEngine();

            string script = "var frm = new System.Windows.Forms.Form(); frm.Text = 'Testing...'; frm.ShowDialog();";

            object result = jint.Run(script);

The problem however is that the Title property is never set. 


Nov 13, 2009 at 2:18 PM

You should send it to the Windows Forms team at Microsoft ;) Because that's the way Form.Text behaves, and it shows how Jint can be powerful !

Try typing your code without Jint, you will see the same result.


Nov 13, 2009 at 2:24 PM

Thanks for the quick reply sebastienros!

I am a little confused by your response. Are you implying that the following code is not equivalent to the javascript I have posted above?

Form frm = new System.Windows.Forms.Form();

frm.Text = "Testing...";






Nov 13, 2009 at 2:26 PM

Both codes are equivalent, and if you run the second block without Jint, you will have the same exact result: Title of the form will change, because you set the Text property.

Nov 13, 2009 at 2:29 PM

Thanks sebastienros,

Sorry for the confusion, maybe I wasn't clear in my question.

The issue I have at the moment is that the title of the form created using jint is NOT set (there is no value in the title bar) whereas the C# example creates the form with the value "Testing..." in the title bar. 


Nov 13, 2009 at 2:31 PM

Now I see ;) Sorry, I though it was modified. I will check that part.

Nov 15, 2009 at 1:54 PM

This issue has now been corrected with the latest version.

Nov 16, 2009 at 1:23 PM

Thank you sebastienros!