The xTuple ERP Scripting API defines the interface between extension scripts and the xTuple ERP C++ core. More...
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... | |
The xTuple ERP Scripting API defines the interface between extension scripts and the xTuple ERP C++ core.
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:
This tells the current QScriptEngine to use the contents of the script named "soap2js" and appears near the top of the weatherForAddress.js script.
This tells the current QScriptEngine to use the contents of two scripts, one named "storedProcErrLookup" and the other named "xtmfgErrors".
first | The name of a script to include |
second | Optional: The name of a second script to include |
QScriptValue QSqlDatabasetoScriptValue | ( | QScriptEngine * | engine, |
QSqlDatabase const & | item | ||
) |
Script Exposure of QSqlDatabase class.
Generated on Fri Apr 9 2021 | xTuple ERP Programmer Reference, Version 5.0.0 | 1.8.17 |