The Motive Javascript Client

Motive_logo_sm.png

The Javascript API documentation provides a object reference, code examples and more for the Motive Database Client.

300px-Client_screenshot.png

Useful links

For more details of this project, check the following links:

Getting started

Objects in the global scope

Due to limitations of the documentation system for javascript, the differenation between javascript objects and functions available in global scope is slightly misleading.

Global objects or functions can be accessed without creating with the new operator (e.g. Globals). Global functions can be called directly without an object (e.g., print(), see GlobalScope for reference). Library functions are functions that actually look and behave like global functions, but are defined in a javascript file. The example illustrates the various types of global objects:

function testGlobalThings() {
     // this is a global function:
    var id = simulationrun(5);

    // global function 'print' accessing the global object 'Globals':
    // Globals is object of type "Globals"
    print(Globals.simulationRunId);

    // creating an object explicitely with the new operator:
    var ds = new DataSource;
     // calling the library function loadTable() that creates a "DataSource" object:
    var ds2 = loadTable('myfile.txt');
    // --> ds and ds2 are both objects of type "DataSource"
}

written by werner rammer, petr kneblik


Generated on Tue Jun 26 09:45:50 2012 for Motive Database Client API by  doxygen 1.5.9