![]() The Input event works similar, but passes back the result from Xojo back to JavaScript and converts the types back. The print command will raise the Print event and allow you to implement a print command for JavaScript to write to a log window. If something goes wrong you may get a JavaScriptEngineExceptionMBS exception raised, so it may be good to wrap it in a try & catch block.įor your convenience we define a Print, Input and Yield function in JavaScript. Alternative you can use EvaluateToString which converts result to string. The variant will now contain the number 5. For your convenience we convert between JavaScript data types and Xojo's variant data type. ![]() Then you can evaluate some JavaScript code and get back a result. You can use JavaScriptEngineMBS class in next plugin version and instantiate a JavaScript environment. ![]() If you need, you can run JavaScript snippets at runtime to do calculations and even integrate your own functions to call back to Xojo. You can execute JavaScript similar to the XojoScript control and offer it to your users as a scripting language within your solution. For next MBS Xojo Plugins we add a JavaScript engine to be used within your Xojo application without a HTMLViewer control.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |