JavaScriptEngineMBS; registerFunction does not work;

Ok, I tried the examples for JavaScriptEngineMBS and recognized that the callback via registerFunction does not work.

I am using Xojo 2019R3 with MBS plugins 20.1.

Any hint or idea what else to try?

This is the Xojo part:

[code]je = New MyJavaScriptEngineMBS

je.list = List

// register a custom function
je.RegisterFunction “MessageBox”, AddressOf MessageBox, 1, Nil

// define a function in JavaScript
je.AddFunction “Add”, “function (x,y) { return x+y; }”[/code]

This is the JavaScript part:

MessageBox("Result: "+Add(3,4));

Thanks a lot!

This is our example project?

While implementing the MT variant for the routines, I am sorry, but I forgot the non MT version and nobody noticed the missing msgbox.

It’s fixed now and I can email you a download link.

Got the link!!! Great!!!

Thanks a lot!!!