Hi, i'm learning SC and how to use worker-scripts (with UI) for some sniffing/debuging tasks with UART.
I'd like to make use of some FSM (Finite State Machine) like XState. In the first i wrote a very basic approach from scratch, but feel to spend too much time doing basic stuff that it already available on SF or Github for Javascript.
But even some codesnippets from stackoverflow won't do, maybe because the ECMA standard supported by SC is too old? (What level/year does it support anyway?)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
JavaScript is based on ECMA. But it extends it. And on top, some browsers add there own JavaScript functions that other browsers don't have. Therefore you cannot execute all JavaScript code with ScriptCommunicator.
Can you upload the code that does not work ?
Last edit: Stefan Zieker 2024-01-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The ScriptEditor is just a simple editor deleloped by me. The intention was to have an editor for simple script (like these in the example folder). I had/have no time to implement an editor that fully supports the modern JavaScript.
ScriptCommunicator and the ScriptEditor are open source. So you can do it yourself if you like.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All fine. So you mean the script code i pasted above would run, even if it's not shown correctly in your editor? The good thing on your editor is the UI integration.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, i'm learning SC and how to use worker-scripts (with UI) for some sniffing/debuging tasks with UART.
I'd like to make use of some FSM (Finite State Machine) like XState. In the first i wrote a very basic approach from scratch, but feel to spend too much time doing basic stuff that it already available on SF or Github for Javascript.
But even some codesnippets from stackoverflow won't do, maybe because the ECMA standard supported by SC is too old? (What level/year does it support anyway?)
Hi,
JavaScript is based on ECMA. But it extends it. And on top, some browsers add there own JavaScript functions that other browsers don't have. Therefore you cannot execute all JavaScript code with ScriptCommunicator.
Can you upload the code that does not work ?
Last edit: Stefan Zieker 2024-01-17
Sure, this is a code-snippet of a super-simple FSM written as Lambda:
The code runs in the browser but if put into the code editor of SC you get an error:
Last edit: devnull 2024-01-17
I don't get all the fine differences in ECMA-262. Is there a page to know which command is supported in latest version of SC and which not?
This is a code-snippet of a super-simple FSM written as Lambda which won't run in SC:
The code runs in the browser but if put into the code editor of SC
Last edit: devnull 2024-01-17
The JavaScript functions supported by ScriptCommunicator can be found here: https://wiki.qt.io/JavaScript
The ScriptEditor is just a simple editor deleloped by me. The intention was to have an editor for simple script (like these in the example folder). I had/have no time to implement an editor that fully supports the modern JavaScript.
ScriptCommunicator and the ScriptEditor are open source. So you can do it yourself if you like.
All fine. So you mean the script code i pasted above would run, even if it's not shown correctly in your editor? The good thing on your editor is the UI integration.