Reviewed: ClearScript 5.3 (Mar 07, 2014)
Rated 5 Stars (out of 5) - Impressive project and very responsive contributors. Actively developed, easy to use and it works well.
View ArticleNew Post: for each item in collection loop does not work for datatable
I tried this in JScript and it does not work (same as VBScript):js.Execute("for(row in dt.Rows) { for(col in row.Table.Columns) { Response.Write row(col.ColumnName).ToString(); } }")Can this work in V8...
View ArticleNew Post: for each item in collection loop does not work for datatable
Hello shripaldalal,​ Can this work in V8 ? I don't mind using Count and Item properties for iteration but I would prefer this more.​ JavaScript's for/in statement does work, but it doesn't do what you...
View ArticleNew Post: Parent-child script relation
Hi, Following code does not work. Expected result is 20. I have one global script and one child script that use it. numValue variable from the global script is not available from in child script....
View ArticleNew Post: Delegate
Hi furesoft, Please see this thread for an example of how to handle .NET events in script code. Good luck!
View ArticleNew Post: Parent-child script relation
Hello ifle, Since you're exposing the parent's global object in the child under the name "GlobalScript", you probably meant to write this: Console.WriteLine(childScript.Evaluate("5 *...
View ArticleNew Post: Parent-child script relation
This way that works our legacy application. My example is very simple, but our global script contains hundreds functions that can be called from a customer child script functions
View ArticleNew Post: Parent-child script relation
Sorry. This my mistake, our application used with AddNamedItem with globalvariable flag.
View ArticleNew Post: Parent-child script relation
Hi ifle, This seems to work:using (var globalScript = new VBScriptEngine()) using (var childScript = new VBScriptEngine()) { Console.WriteLine("Start VBScriptEngine"); globalScript.Script.numValue = 4;...
View ArticleNew Post: execute external javascript
Hi ClearScript team, I have javascript loaded in my website and it creates div and append that to body. I want to know by using clearscripts, can I execute that javascript file and get that output to a...
View ArticleNew Post: Getting JS exception
Hi there, I'm back with more exception-related questions! :) Now I'm trying to handle (or at least, correctly log) an unhandled exception thrown from JS. Something like this:engine.Execute("throw...
View ArticleNew Post: execute external javascript
Greetings, chap! ClearScript provides only a "bare" JavaScript execution environment to which you can add .NET objects and types. It does not implement the HTML DOM. If your application can do its job...
View ArticleNew Post: Getting JS exception
Hello! This question is similar to your earlier one about catching .NET exceptions in JavaScript, and our answer is similar as well - consider catching the exception in JavaScript and allowing .NET...
View ArticleNew Post: Getting JS exception
Hi, Well, by reading your answer, the workaround looks obvious! :) Thanks for the help. Is there any plan to have more seamless exception handling between .NET and JS, even for V8 only? That would be...
View ArticleNew Post: Decimal values problems
Hi, There is a problem with marshaling of decimal values. Following code does not work. Type mismatch errorusing(var scripter = new VBScriptEngine(WindowsScriptEngineFlags.EnableDebugging)) { decimal...
View ArticleNew Post: Problem with nullable property of object
Hi, There is problem with is Nothing keyword in VBScript when object property is null. In my case MyClass.Class2 property is nullpublic class MyClass { public MyClass2 Class2 { get; set; } } public...
View ArticleNew Post: Decimal values problems
Hello Igor, VBScript doesn't support System.Decimal, but because it's a valid COM automation type, it stores it correctly and can return it to the host without data loss. This is by design. If you'd...
View Article