Method Summary
Method Attributes |
Method Name and Description |
|
Adds breakpoints
|
|
Adds watches
|
|
Closes the dialog box
|
|
Returns the user's code
|
|
|
|
Sets if block setup is forced in level2
|
|
Sets tool in fullscreen
|
|
Scrolls to a block element in the tooblox or view
|
|
Gets list of breakpoints
|
|
Returns the grid's properties
|
|
Gets the input from I/O
|
|
Gets the number of lines of code in the current/last execution
|
|
Gets the number of instructions run in the last completed execution
|
|
Gets the exection time in the last completed execution
|
|
Gets the output from I/O
|
|
Returns the status of the current or last execution
|
|
Returns the name of the current toolbox
|
|
Returns the name of the current view
|
|
Gets watches
|
|
Returns the image binary of the whiteboard
|
|
Returns the whiteboard size
|
|
Returns if the eSeeCode is ready
|
|
Checks if the status of the current or last execution corresponds to the expectation
|
|
Sets the code view maximized
|
|
Pauses execution
|
|
|
|
|
|
Remove breakpoints
|
|
Remove watches
|
|
Resets the execution
|
|
Restarts eSeeCode interface
|
|
Restores the lasts autosaved code
|
|
Resumes execution
|
|
Runs code silently
|
|
Run a number of steps (forward or backwards)
|
|
Scrolls to a block element in the tooblox or view
|
|
Chooses the predefined axis to use for the grid
|
|
Sets the base path for loading images and sounds
|
|
Sets the default block setup style
|
|
Sets definitions of custom instructions
|
|
Sets the number of the lines in the grid
|
|
Sets the separation of the lines in the grid
|
|
Sets a custom image for the whiteboard guide
|
|
Sets a custom size for the whiteboard guide
|
|
Sets the input in I/O
|
|
Sets the instruction blocks to make available to the user
|
|
Time each instruction delays the execution
|
|
Pauses after every instruction for a certain amount of time
|
|
Prevent exit when user has entered code
|
|
Defines the number of instructions to jump on every stepped execution
|
|
Switches between code and flow styles
|
|
Switches the active theme
|
|
Shows/Hides views tabs
|
|
Sets the background of the whiteboard
|
|
Changes the whiteboard size
|
|
Shows/Hides the filemenu
|
|
Shows/Hides flow tab
|
|
Shows/Hides the fullscreen menu
|
|
Shows/Hides the grid
|
|
Shows/Hides the guide
|
|
Shows/Hides multiselect tab
|
|
Defines the number of instructions to jump on every stepped execution
|
|
Shows/Hides the themes menu
|
|
Shows/Hides the translations menu
|
|
Stops execution
|
|
Switches to the specified language
|
|
Switches to the specified toolbox
|
|
Switches to the specified view
|
|
Marks the code as saved now
|
|
Loads code into the view
|
|
Loads postcode into the view
|
|
Loads precode into the view
|
Method Detail
addBreakpoints(value, action)
Adds breakpoints
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setBreakpoints([8, "name", "age"])
- Parameters:
-
{Number|String|Array} value
- Block/Line numbers and/or variable names where breakpoints are to be placed
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 4.0
addWatches(value, action)
Adds watches
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.addWatches([ "firstname", "surname" ])
- Parameters:
-
{String|Array} value
- Variable names to watch
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 4.0
closeMsgbox()
Closes the dialog box
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.closeMsgbox()
- Since:
- 4.0
{String}
downloadCode()
Returns the user's code
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.downloadCode()
- Returns:
- {String} User code
execute(value, immediate)
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
- Parameters:
-
value
-
immediate
forceBlockSetup(value)
Sets if block setup is forced in level2
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.forceBlockSetup(true)
- Parameters:
-
{Boolean} value
- Whether or not to force block setup when adding instructions on level2
- Since:
- 3.0
fullscreen(fullscreen)
Sets tool in fullscreen
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.fullscreen()
- Parameters:
-
{Boolean} fullscreen
Optional
- Force fullscreen
- Since:
- 2.3
{HTMLElement}
getBlockByPosition(value)
Scrolls to a block element in the tooblox or view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getBlockByPosition(blockEl)
- Parameters:
-
{Number} value
- Position to look for
- Since:
- 4.0
- Returns:
- {HTMLElement} The block element in that position
{Array}
getBreakpoints()
Gets list of breakpoints
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getBreakpoints()
- Since:
- 3.2
- Returns:
- {Array} Block/Line numbers and/or variable names where breakpoints/watches are to be set up
getGridProperties()
Returns the grid's properties
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getGridProperties()
- Since:
- 3.0
{String}
getInput()
Gets the input from I/O
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getInput()
- Since:
- 2.3
- Returns:
- {String} Input in the I/O
{Number}
getLastExecutionCodeLinesCount()
Gets the number of lines of code in the current/last execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getLastExecutionCodeLinesCount()
- Since:
- 3.0
- Returns:
- {Number} Number of lines of code in the current/last execution
{Number}
getLastExecutionInstuctionsCount()
Gets the number of instructions run in the last completed execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getLastExecutionInstuctionsCount()
- Since:
- 3.0
- Returns:
- {Number} Number of instructions run in the last completed execution
{Number}
getLastExecutionTime()
Gets the exection time in the last completed execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getLastExecutionTime()
- Since:
- 3.0
- Returns:
- {Number} Execution time of code in the last completed execution
{String}
getOutput()
Gets the output from I/O
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getOutput()
- Since:
- 2.3
- Returns:
- {String} Output in the I/O
{String}
getStatus(value)
Returns the status of the current or last execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getStatus()
- Parameters:
-
value
- Since:
- 4.0
- Returns:
- {String} Status of the execution
{String}
getToolbox()
Returns the name of the current toolbox
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getToolbox()
- Since:
- 4.0
- Returns:
- {String} Name of the current toolbox
{String}
getView()
Returns the name of the current view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getView()
- Since:
- 2.3
- Returns:
- {String} Name of the current view
{Array}
getWatches()
Gets watches
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getWatches()
- Since:
- 3.2
- Returns:
- {Array} Variable names where watches are set up
{String}
getWhiteboard(gridVisible, guideVisible)
Returns the image binary of the whiteboard
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getWhiteboard()
- Parameters:
-
{Boolean} gridVisible
- Can be use to force toggling the grid
-
{Boolean} guideVisible
- Can be use to force toggling the guide
- Since:
- 2.3
- Returns:
- {String} Data URL of the whiteboard
{Object}
getWhiteboardResolution()
Returns the whiteboard size
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getWhiteboardResolution()
- Since:
- 4.0
- Returns:
- {Object} Returns an object width and the height
{String}
isReady()
Returns if the eSeeCode is ready
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.isReady()
- Since:
- 2.4
- Returns:
- {String} The date since it is ready, undefined otherwise
{String}
isStatus(value)
Checks if the status of the current or last execution corresponds to the expectation
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.getStatus()
- Parameters:
-
{String} value
- Check if the execution is in this specific status
- Since:
- 4.0
- Returns:
- {String} Status of the execution
maximize(value)
Sets the code view maximized
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.maximize()
- Parameters:
-
{Boolean} value
Optional
- Force code maximized
- Since:
- 2.4
pause()
Pauses execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.pause()
- Since:
- 3.2
postrun(callback)
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
- Parameters:
-
callback
prerun(callback)
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
- Parameters:
-
callback
removeBreakpoints(value, action)
Remove breakpoints
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.ui.debug.updateRemovedBreakpoints([8, "name", "age"])
- Parameters:
-
{Number|String|Array} value
- Block/Line numbers and/or variable names to remove from breakpoints
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 4.0
removeWatches(value, action)
Remove watches
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.removeWatches([ "name", "age" ])
- Parameters:
-
{String|Array} value
- Block/Line numbers and/or variable names to remove from watches
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 4.0
reset()
Resets the execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.reset()
- Since:
- 2.3
restart()
Restarts eSeeCode interface
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.restart()
- Since:
- 2.3
restoreAutosave(value)
Restores the lasts autosaved code
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.restoreAutosave(true)
- Parameters:
-
{Boolean|String} value
- Whether to restore now the last autosaved code or not
- Since:
- 4.0
resume()
Resumes execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.resume()
- Since:
- 3.2
runCode(code)
Runs code silently
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.runCode("repeat(4){forward(100)}")
- Parameters:
-
{String} code
- Code to run
- Since:
- 2.3
runSteps(steps)
Run a number of steps (forward or backwards)
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.runSteps(1)
- Parameters:
-
{Number} steps
- Number of steps to run. A possitive number runs forwards, a negative number runs backwards
- Since:
- 4.0
scrollToBlock(blockEl)
Scrolls to a block element in the tooblox or view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.scrollToBlock(blockEl)
- Parameters:
-
{HTMLElement} blockEl
- Block to scroll to
- Since:
- 4.0
setAxis(value, action)
Chooses the predefined axis to use for the grid
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setAxis(0)
- Parameters:
-
{Number|String} value
- Index of the predefined axis to use
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
setBasePath(value)
Sets the base path for loading images and sounds
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setBasePath("https://eseeco.de/example/")
- Parameters:
-
{String} value
- Base path, can be a full URL
- Since:
- 3.0
setBlockSetup(value)
Sets the default block setup style
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setBlockSetup("basic")
- Parameters:
-
{String} value
- Pixels between each line in the grid
- Since:
- 2.4
setCustomInstructions(value, action)
Sets definitions of custom instructions
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setCustomInstructions({...})
- Parameters:
-
{Number|String} value
- JSON or object defining an instruction using set.js structure plus an optional "run" property with the body of the function code and an "icon" property with the URL or relative path of the icon representing the instruction
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 3.0
setGridDivisions(value, action)
Sets the number of the lines in the grid
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setGridDivisions(10)
- Parameters:
-
{Number|String} value
- Number of lines in the grid
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.4
setGridStep(value, action)
Sets the separation of the lines in the grid
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setGridStep(50)
- Parameters:
-
{Number|String} value
- Pixels between each line in the grid
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Deprecated:
-
since version 2.4
- Since:
- 2.3
setGuideImage(value)
Sets a custom image for the whiteboard guide
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setGuideImage("https://eseecode.com/favicon.png")
- Parameters:
-
{String} value
- URL where the image is, can be a relative path
- Since:
- 3.2
setGuideSize(value)
Sets a custom size for the whiteboard guide
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setGuideSize(25)
- Parameters:
-
{Integer} value
- Size in pixels of the guide
- Since:
- 3.2
setInput(value, action)
Sets the input in I/O
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setInput("1 1 2 3 5 8")
- Parameters:
-
{String} value
- Input to use
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
setInstructions(value, action)
Sets the instruction blocks to make available to the user
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setInstructions("turnLeft;90;forward")
- Parameters:
-
{String} value
- Instructions to make available (separated with semi-colon, parameters can be postfixed to each instruction also separated with semi-colons)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
setInstructionsDelay(value)
Time each instruction delays the execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setInstructionsDelay(500)
- Parameters:
-
{Number} value
- Time to spend on each instruction, in milliseconds
- Since:
- 4.0
setInstructionsPause(value)
Pauses after every instruction for a certain amount of time
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setInstructionsPause(500)
- Parameters:
-
{Number} value
- Time to pause after each instruction, in milliseconds
- Since:
- 3.0
setPreventExit(value)
Prevent exit when user has entered code
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setPreventExit(false)
- Parameters:
-
{Boolean|String} value
- Whether to prevent exit when user has coded
- Since:
- 2.4
setStepSize(step)
Defines the number of instructions to jump on every stepped execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setStepSize(1)
- Parameters:
-
{Number} step
- Number of instructions after which execution must be paused when running stepped
- Since:
- 4.0
setStyle(style)
Switches between code and flow styles
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setStyle()
- Parameters:
-
{String} style
- Blocks style
- Since:
- 4.0
setTheme(theme, run)
Switches the active theme
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setTheme("sharp")
- Parameters:
-
{String} theme
- Name of the theme to use
-
{Boolean} run
Optional, Default: true
- If true, applies the theme immediately
- Since:
- 2.4
setViewTabs(value)
Shows/Hides views tabs
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setViewTabs("touch, drag")
- Parameters:
-
{String} value
- List of view tabs to display, separated with colon or semi-colon
- Since:
- 2.4
setWhiteboardBackground(url)
Sets the background of the whiteboard
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setWhiteboardBackground("https://eseecode.com/favicon.png")
- Parameters:
-
{String} url
- URL where the background is, can be a relative path
- Since:
- 3.2
setWhiteboardResolution(value, run)
Changes the whiteboard size
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setWhiteboardResolution("sharp")
- Parameters:
-
{ArrayNumber|String|Number} value
- Width and height of the new whiteboard
-
{Boolean} run
Optional, Default: true
- If true, applies the theme immediately
- Since:
- 4.0
showFilemenu(value, action)
Shows/Hides the filemenu
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showFilemenu(false)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
showFlowTab(value)
Shows/Hides flow tab
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.setFlowTabs(false)
- Parameters:
-
{Boolean} value
- Whether to display the flow tab or not
- Since:
- 4.0
showFullscreenmenu(value, action)
Shows/Hides the fullscreen menu
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showFilemenu(false)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
showGrid(value, action)
Shows/Hides the grid
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showGrid(false)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
showGuide(value, action)
Shows/Hides the guide
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showGuide(false)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
showMultiselectTab(value)
Shows/Hides multiselect tab
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showMultiselectTab(false)
- Parameters:
-
{Boolean} value
- Whether to display the multiselect tab or not
- Since:
- 4.0
showStep(value)
Defines the number of instructions to jump on every stepped execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showStep(1)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
- Since:
- 4.0
showThemes(value, action)
Shows/Hides the themes menu
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showThemes(false)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.4
showTranslations(value, action)
Shows/Hides the translations menu
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.showTranslations(false)
- Parameters:
-
{Boolean|String} value
- Whether to show it (true) or hide it (false)
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.4
stop()
Stops execution
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.stop()
- Since:
- 3.2
switchLanguage(value, action)
Switches to the specified language
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.switchLanguage("ca")
- Parameters:
-
{String} value
- Language to switch to
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
switchToolbox(id, action)
Switches to the specified toolbox
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.switchToolbox("io")
- Parameters:
-
{String} id
- Toolbox to switch to
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 4.0
switchView(id, action)
Switches to the specified view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.switchView("build")
- Parameters:
-
{String} id
- View to switch to
-
{Boolean} action
Optional, Default: true
- Whether to run the actions to apply the changes (true) or just set the variables (false)
- Since:
- 2.3
updateSavedTime()
Marks the code as saved now
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.updateSavedTime()
- Since:
- 2.4
uploadCode(code, run)
Loads code into the view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.uploadCode("repeat(4){forward(100)}", true)
- Parameters:
-
{String} code
- Code to upload
-
{Boolean} run
Optional, Default: false
- If true, it runs the code immediately
uploadPostcode(code)
Loads postcode into the view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.uploadPostcode("repeat(4){forward(100)}")
- Parameters:
-
{String} code
- Code to set as postcode
- Since:
- 2.4
uploadPrecode(code, run)
Loads precode into the view
Defined in: </tmp/tmp.fx2Xv6HGnf.js>.
$e.api.uploadPrecode("repeat(4){forward(100)}")
- Parameters:
-
{String} code
- Code to set as precode
-
{Boolean} run
Optional, Default: true
- If false, it doesn't run the code immediately, only when the user executes user code
- Since:
- 2.2