Classes | Functions
The xTuple ERP Scripting API

Classes

class  QIODeviceProto
 This class exposes the QIODevice class to Qt Scripting. More...
 
class  QProcessProto
 This class exposes the QIODevice class to Qt Scripting. More...
 
class  ScriptToolbox
 The ScriptToolbox provides a collection of miscellaneous utility methods used when writing xTuple ERP extension scripts. More...
 

Functions

 include (String first, String second,...)
 Include the named script(s) in the current script. More...
 
QScriptValue QSqlDatabasetoScriptValue (QScriptEngine *engine, QSqlDatabase const &item)
 Script Exposure of QSqlDatabase class. More...
 

Detailed Description

The xTuple ERP Scripting API defines the interface between extension scripts and the xTuple ERP C++ core.

Function Documentation

include ( String  first,
String  second,
  ... 
)

Include the named script(s) in the current script.

This lets the script developer put commonly used QtScript (JavaScript) code in a single place and use it in multiple other scripts. All named scripts are included in the order listed. If more than one script exists with the given name, all of them are included in increasing order by script_order. The inclusion is done as the script is executed, so if an include() call appears in the middle of a function, the include will not be done until that function gets called. If any of the included scripts throws an exception while being included, no subsequent scripts in the list will be processed.

For example:

1 include("soap2js");

This tells the current QScriptEngine to use the contents of the script named "soap2js" and appears near the top of the weatherForAddress.js script.

1 include("storedProcErrLookup", "xtmfgErrors");

This tells the current QScriptEngine to use the contents of two scripts, one named "storedProcErrLookup" and the other named "xtmfgErrors".

Parameters
firstThe name of a script to include
secondOptional: The name of a second script to include
Returns
The number of arguments that were processed
See also
weatherForAddress.js
include.cpp
QScriptValue QSqlDatabasetoScriptValue ( QScriptEngine *  engine,
QSqlDatabase const &  item 
)

Script Exposure of QSqlDatabase class.

Todo:

implement QSqlDatabase::addDatabase(QSqlDriver*, const QString &connectionName)

implement QSqlDatabase::registerSqlDriver(const QString &, QSqlDriverCreatorBase *)


Generated on Fri Oct 7 2016 14:23:27 xTuple ERP Programmer Reference, Version 4.2.0 doxygen 1.8.10