STAY IN TOUCH

and receive our newsletter to get the latest news and tips.


App

Interact with the app runtime
function app → allow other events
Allow execution of other events, before the current event finishes.
function app → create logger(category : String) returns App Logger
Creates a specialized logger
function app → current handler returns Event Binding
Gets the binding of the current handler if any. This can be used to delete a handler from itself.
function app → editor returns Editor
[beta] Get the Editor interface
function app → env returns App Env
[beta] Access various properties of application environment
function app → fail if not(condition : Boolean)
Aborts the execution if the condition is false.
function app → host exec(message : String) returns String
[beta] Invokes the host to execute a command described in the message and returns the response. There is no restriction on the format of the request and response. If not available or errored, returns invalid.
function app → host subscribe(message : String, handler : Text Action) returns Event Binding
[beta] Invokes the host to register an event listener described in the message.
function app → import(manager : String, module : String, version : String)
Imports a dependent package which may be versioned. Package managers may be Node.JS npm, Bower, Apache cordova, Python Pip and TouchDevelop plugins. bower and client imports are not available within the touchdevelop.com domain.
function app → javascript(calling convention : String, script : String)
When exported, run script instead of the body of the action
function app → javascript async(calling convention : String, script : String)
When exported, run script instead of the body of the action
function app → log(message : String)
Appends this message to the debug log.
function app → reflect(what : String) returns Json Object
[beta] Return runtime information about functions and types defined in script and its libraries
function app → restart(message : String)
Restarts the app and pops a restart dialog
function app → run command(cmd : String, data : Json Object) returns Json Object
Runs a shell command. This action is only available when the script is running from a local web server.
function app → script id returns String
Gets the app script id if any; invalid if not available
function app → server request returns Server Request
[beta] Get the current incomming HTTP web request
function app → server response returns Server Response
[beta] Get the response corresponding to the current incomming HTTP web request
function app → server setting(key : String, optional : Boolean) returns String
When exported server-side, retreives the value of a setting stored on the server. If not optional, fails if missing. Returns invalid if missing.
function app → show logs(filter : String)
[beta] Shows a dialog with the logs
function app → stop
Stops the app.
function app → thumb(script : String)
When compiled to ARM Thumb, inline the body.

edit this topic xfjmxafgyw