Quantcast
Channel: ClearScript
Browsing all 2297 articles
Browse latest View live

New Post: Weird Parameter Passing Behavior

Hi JC, ClearScript converts strings automatically, so if the script function returns a string, the host should see it as a .NET string, and casting via CStr() or CType() should work. It appears instead...

View Article



New Post: Weird Parameter Passing Behavior

Hello again! Here is what my getChunkJSON function looks like...function getChunkJSON(num) { return JSON.stringify(Chunks[num]); } That code simply returns a string value. That is not my exact code,...

View Article

New Post: Weird Parameter Passing Behavior

Hi JC,​ That code simply returns a string value. That is not my exact code, but that has the same result. ​ Hmm, is it possible that getChunkJSON() actually returns a string object rather than string -...

View Article

New Post: Weird Parameter Passing Behavior

Yeah, that is more than likely because the final step is a string compressor with a ton of String class functions. Is there an easy way to read the string object as a string without using the...

View Article

New Post: Parameter number conflict.

my code:engine.AddHostObject("$", new Action<dynamic>(o => new Window(f).AddEventHandler("Load", o))); engine.AddHostObject("$", new Action<string, dynamic>((n, o) => new...

View Article


New Post: Weird Parameter Passing Behavior

Hi JC,​ Is there an easy way to read the string object as a string without using the .toString() function in JS itself? ​ Sure, you can call toString() or valueOf() from the host: s =...

View Article

New Post: Parameter number conflict.

Hi furesoft, Can you give us more info? Are you seeing a compilation error? Runtime exception? Is there a stack, line number, etc.? Thanks!

View Article

New Post: Weird Parameter Passing Behavior

Alright thanks, and hopefully my last question... I am using the Function you provided above for calling methods by name and arguments.. Every time it tries to actually invoke the delegate it errors on...

View Article


New Post: Performance...

Hi, I have also seen that the JScript version of ClearScript works quite well in my environment as well. Better for micro benchmarks over v8 and jint. I am considering moving to this over my old...

View Article


New Post: Parameter number conflict.

my js:$(function(sender, e) { alert("hello to my EFML-Application :D"); }); $("FormClosing", function(sender, e) { alert("Application is closing"); }); no line number, no compilation error....

View Article

New Post: Parameter number conflict.

Hi furesoft, JavaScript doesn't support property overloading. Your host code sets script property "$" to a delegate that takes one argument, then overwrites it with a delegate that takes two arguments....

View Article

New Post: Parameter number conflict.

i dont understand what you mean, give me a code example, please

View Article

New Post: Parameter number conflict.

Your first call to AddHostObject() creates a property named "$" whose value is a delegate with one parameter. Your second call to AddHostObject() overwrites the property created in step 1. The new...

View Article


New Post: Parameter number conflict.

when i change the order of addhostobject i get this exception: One can not be called non-delegate type.

View Article

New Post: Weird Parameter Passing Behavior

Hi JC, It sounds like the named property you're invoking isn't a function :) The following test program demonstrates the extension module above:Module TestModule Sub Main() Using engine AsNew...

View Article


New Post: Parameter number conflict.

That makes sense. With the order reversed, the "$" property ends up being set to a one-parameter delegate. The second call in your script invokes it with two arguments, which is OK, but the first...

View Article

New Post: Weird Parameter Passing Behavior

No. Here is my exact code with your test above. (Little messier for testing purposes.)Public Function InvokeJSFunction(name As String, args() As Object) Dim host As New HostFunctions...

View Article


New Post: Weird Parameter Passing Behavior

Are the exceptions you're seeing unhandled? The C# dynamic infrastructure throws and handles exceptions internally. Please test outside the debugger, or just continue when you hit first-chance...

View Article

New Post: Performance...

Jules, the JScript is "unmanaged" in terms of that it is part of the "Active Scripting" technologies of Microsoft which includes VBScript and JScript. See this Wikipedia article for the ECMA version...

View Article

New Post: Parameter number conflict.

how can i use a third version? $("elementname")

View Article
Browsing all 2297 articles
Browse latest View live




Latest Images