New Post: for/in loop in JScript standards mode
Hi again, We have a set of Javascripts that work with Google Chrome and Firefox and we would rather not modify them with non-standard code. Just curious, why are you using JScript? V8 provides much...
View ArticleReopened Issue: for/in loop in JScript standards mode fails [94]
It appears that the for/in loop is not working when JScript engine is initialized with WindowsScriptEngineFlags.EnableStandardsMode flag.I tried adding PropertyBag and ExpandoObject as host objects.I...
View ArticleEdited Issue: for/in loop in JScript standards mode fails [94]
It appears that the for/in loop is not working when JScript engine is initialized with WindowsScriptEngineFlags.EnableStandardsMode flag.I tried adding PropertyBag and ExpandoObject as host objects.I...
View ArticleEdited Issue: [BUG] JScript for..in loop fails in Standards Mode [94]
It appears that the for/in loop is not working when JScript engine is initialized with WindowsScriptEngineFlags.EnableStandardsMode flag.I tried adding PropertyBag and ExpandoObject as host objects.I...
View ArticleNew Post: for/in loop in JScript standards mode
ClearScript wrote: Hi again, We have a set of Javascripts that work with Google Chrome and Firefox and we would rather not modify them with non-standard code. Just curious, why are you using JScript?...
View ArticleNew Post: Question about passing generic List.
I am trying to convert an C# application that used VSA JScript engine to use ClearScript with V8 engine. I have a question about how ClearScript handles generic list. I have the follow sample code:...
View ArticleNew Post: Question about passing generic List.
Hello! Here's what's going on. In your script code, the expression Me.MyList is of the managed type IList<Item>. This type has an indexer that is actually an indexed property named "Item"....
View ArticleNew Post: Question about passing generic List.
Thanks you so much for the quick replay. It is exactly what I was looking for! Since we use JavaScript interface for less trained end-users, we really prefer the relaxed and forgiving behavior. I hope...
View ArticleNew Post: How to pass short int from script to C# methods
I have the following code that fails with an exception: short myValue; public void SetValue(short v) { myValue = v; } void ClearScriptTest2(object sender, EventArgs e) { using (var engine = new...
View ArticleNew Post: Question about passing generic List.
Hi again, It looks like that the C# class String is treated specially. Even with DisableTypeRestriction enabled, methods of String class, like EndsWith(), are not exposed to script interface. Is there...
View ArticleNew Post: How to pass short int from script to C# methods
Hi James2015Li, The native value of a JavaScript number is double-precision floating-point. When you pass such a value to a .NET method, ClearScript converts it to one of the following managed types,...
View ArticleCommented Issue: [BUG] JScript for..in loop fails in Standards Mode [94]
It appears that the for/in loop is not working when JScript engine is initialized with WindowsScriptEngineFlags.EnableStandardsMode flag.I tried adding PropertyBag and ExpandoObject as host objects.I...
View ArticleNew Post: How to pass short int from script to C# methods
Thanks for the response. This is really a awkward limitation. I don't know any language that does not support such conversion in a standard way. With the suggested work-around, every embedded script...
View ArticleNew Post: How to pass short int from script to C# methods
Hi again, This is really a awkward limitation. I don't know any language that does not support such conversion in a standard way. The problem is the ambiguity created by bridging two dissimilar...
View ArticleNew Post: How to pass short int from script to C# methods
Which method should be called by the JavaScript expression thing.Foo(123)? Ideally the engine should try to find Foo(int arg); then Foo(short arg), Foo(byte arg), Foo(sbyte), till it finds a match. I...
View ArticleNew Post: How to pass short int from script to C# methods
Hi James2015Li, Based on your comments, we've taken a closer look and decided to make some changes. Ideally the engine should try to find Foo(int arg); then Foo(short arg), Foo(byte arg), Foo(sbyte),...
View ArticleNew Post: How to pass short int from script to C# methods
Thanks for the clarification. Just in the same venue, you probably can also enhance the handling of += operator for singles. With the current ClearScript version statement like "icon.position.x += 2.5"...
View ArticleNew Post: Host objects that implement IExpando (IDispatchEx)
It looks like it is not possible to dynamically add properties from Javascript to host objects that implement IExpando interface (COM objects implementing IDispatchEx) ClearScript is hitting the...
View ArticleNew Post: How to pass short int from script to C# methods
Hi again, V8 doesn't allow hosts to alter the behavior of the arithmetic operators, but with the fix mentioned above no casting should be necessary in this situation. Cheers!
View ArticleNew Post: Host objects that implement IExpando (IDispatchEx)
Hello, That's correct; ClearScript doesn't provide dynamic exposure for IReflect/IExpando instances. Questions:What script engine(s) are you using? Are these managed objects? Or do you need to expose...
View Article