1
Bugs and Issues / Re: EA16 JavaScript DLGInputBox bug
« on: August 02, 2022, 08:38:09 pm »Hello all,
Could this issue be that the current EA configuration is calling a 32-bit "ActiveX" object which is why the 64-bit version comes back with an error?
I am not sure but it sort of looks like it.
Thanks, Adam
I was having similar issues, and found that if you look at the code in the include file you will see:
Code: [Select]
function DLGInputBox( promptText /* : String */, title /* : String */, defaultText /* : String */ ) /* : String */
{
// JavaScript has no intrinsic InputBox method, therefore we have to steal VBs
var vbe = new COMObject("ScriptControl");
vbe.Language = "VBScript";
return vbe.eval( "InputBox(\"" + promptText + "\",\"" + title + "\",\"" + defaultText + "\")");
}
After some experimentation with the Javascript interpreters COMObject( ) method, i started looking at the Javascript EA-Addin functionality.
The JS-Addin feature claims to have EA UI integration for menu items, dialog boxes and such, but I have not yet been able to get it working in EA 16. note the EA16 plugin examples in the example repository seem to be broken (reported).
If you do manage to get the add-in route working, please post..
Update:
After some digging in the JS-Addin documentation, the dialog box i can find is the JavaScript implementation of Session.Input.
Try this in the JavaScript console:
Code: [Select]
Session.Input("Hello")
It may be that any JS-Addin with a UI more complex than a simple dialog-box, requires a diagram with elements and uses the element properties for inputs.