From 30687dfe2e929f3145bf81895ae6272be3a8621f Mon Sep 17 00:00:00 2001 From: "pls.153" Date: Tue, 14 Nov 2023 09:54:34 +0100 Subject: [PATCH] revisions --- doc/help.htm | 5 +++++ src/cpp/ecl_ext.cpp | 3 +++ src/lisp/ini.lisp | 1 + src/lisp/qml.lisp | 3 +++ 4 files changed, 12 insertions(+) diff --git a/doc/help.htm b/doc/help.htm index 28513a7..6eddeb3 100644 --- a/doc/help.htm +++ b/doc/help.htm @@ -17,6 +17,7 @@ Mobile only. Preamble: all asset files are automatically copied to the app directory on the very first app startup. + If you eventually need to copy additional asset files, or replace the current ones, use this function (after installing an app update). @@ -55,6 +56,7 @@ Since we only have floats in QML/JS, INTEGERs from Lisp are converted automatically to hex strings, if (1) populating an item model, or (2) passed with function QJS. + Those hex strings are automatically converted back to a Lisp INTEGER when passed with 'Lisp.call()' or 'Lisp.apply()'. @@ -186,9 +188,11 @@ up to 10 arguments of the following types: T, NIL, INTEGER, FLOAT, STRING, VECTOR of octets, ... and (nested) lists of mentioned arguments. + For the complete list of supported types see 'marshal.cpp:toQVariant()'. A special use case is to populate an item model in QML (using a trivial JS glue code function) which expects a JS dictionary, see example below. + N.B: Does not work with JS default arguments. (qjs |drawLine| *canvas* (float x1) (float y1) (float x2) (float y2)) @@ -218,6 +222,7 @@ The plugin will be reloaded (if supported by the OS) every time you call this function. If the UNLOAD argument is not NIL, the plugin will be unloaded (if supported by the OS). + N.B: This works only for Qt functions with the following signature: "QVariant foo(QVariant, ...)" ; max 10 QVariant arguments Since a QVariant can also be of type QVariantList, this is a perfect fit diff --git a/src/cpp/ecl_ext.cpp b/src/cpp/ecl_ext.cpp index 4cbc329..c7fa26f 100644 --- a/src/cpp/ecl_ext.cpp +++ b/src/cpp/ecl_ext.cpp @@ -262,6 +262,7 @@ cl_object qload_cpp(cl_object l_lib_name, cl_object l_unload) { /// qload-c++ /// The plugin will be reloaded (if supported by the OS) every time you call /// this function. If the UNLOAD argument is not NIL, the plugin will be /// unloaded (if supported by the OS). + /// /// N.B: This works only for Qt functions with the following signature: /// "QVariant foo(QVariant, ...)" ; max 10 QVariant arguments /// Since a QVariant can also be of type QVariantList, this is a perfect fit @@ -488,8 +489,10 @@ cl_object qinvoke_method2(cl_object l_obj, cl_object l_name, cl_object l_args) { // call user defined Qt/C++ plugin functions. // Max. 10 arguments of type T, NIL, INTEGER, FLOAT, STRING, VECTOR of // octets, (nested) LIST of mentioned arguments. + // // For the complete list of supported types see 'marshal.cpp:toQVariant()'. // On Qt side, only QVariant arguments are allowed. + // // N.B. does not support default arguments, if used to call JS functions STATIC_SYMBOL_PKG (s_hex, "HEX", "QML") ecl_process_env()->nvalues = 1; diff --git a/src/lisp/ini.lisp b/src/lisp/ini.lisp index ab823ad..39330a1 100644 --- a/src/lisp/ini.lisp +++ b/src/lisp/ini.lisp @@ -340,6 +340,7 @@ "args: () Mobile only. Preamble: all asset files are automatically copied to the app directory on the very first app startup. + If you eventually need to copy additional asset files, or replace the current ones, use this function (after installing an app update)." #+mobile diff --git a/src/lisp/qml.lisp b/src/lisp/qml.lisp index c3f6f30..7c20992 100644 --- a/src/lisp/qml.lisp +++ b/src/lisp/qml.lisp @@ -20,6 +20,7 @@ Since we only have floats in QML/JS, INTEGERs from Lisp are converted automatically to hex strings, if (1) populating an item model, or (2) passed with function QJS. + Those hex strings are automatically converted back to a Lisp INTEGER when passed with 'Lisp.call()' or 'Lisp.apply()'. @@ -201,9 +202,11 @@ up to 10 arguments of the following types: T, NIL, INTEGER, FLOAT, STRING, VECTOR of octets, ... and (nested) lists of mentioned arguments. + For the complete list of supported types see 'marshal.cpp:toQVariant()'. A special use case is to populate an item model in QML (using a trivial JS glue code function) which expects a JS dictionary, see example below. + N.B: Does not work with JS default arguments. (qjs |drawLine| *canvas* (float x1) (float y1) (float x2) (float y2)) (qjs |addPlanet| *planets* (list :name \"Jupiter\" :src \"img/jupiter.png\"))"