Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| blocks:advanced_scripting:example1 [2019-02-12 21:43] – admin | blocks:advanced_scripting:example1 [2019-03-06 15:51] (current) – Foxed typo in initComms admin | ||
|---|---|---|---|
| Line 62: | Line 62: | ||
| } | } | ||
| - | /** Hook up event handler | + | /** What needs to be one when we connect (or re-connect) to the reader |
| */ | */ | ||
| doWhenConnected() { | doWhenConnected() { | ||
| Line 73: | Line 73: | ||
| */ | */ | ||
| initComms() { | initComms() { | ||
| - | if (this.networkPort.connected) {} | + | if (this.networkPort.connected) { |
| this.networkPort.sendText(' | this.networkPort.sendText(' | ||
| this.networkPort.sendText(' | this.networkPort.sendText(' | ||
| Line 126: | Line 126: | ||
| * The script must be saved in a file named LeuzeScript.ts in the script/user directory of the Blocks root. | * The script must be saved in a file named LeuzeScript.ts in the script/user directory of the Blocks root. | ||
| * It compiles to a file named LeuzeScript.js, | * It compiles to a file named LeuzeScript.js, | ||
| + | * The script doesn' | ||
| * The class name must match the filename (minus the .ts/.js file extension). | * The class name must match the filename (minus the .ts/.js file extension). | ||
| * Several // | * Several // | ||