mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-07 02:50:59 -08:00
fix and improve "qml-lisp" example; allow nested QVariantLists (JS arrays in QML);
This commit is contained in:
parent
0e82b0a517
commit
03c7a5ded5
5 changed files with 27 additions and 10 deletions
|
|
@ -7,9 +7,17 @@
|
|||
|
||||
(defvar *qml-lisp* (qload-c++ "lib/qml_lisp"))
|
||||
|
||||
(defun string-to-symbol (name)
|
||||
(let* ((upper (string-upcase name))
|
||||
(p (position #\: name)))
|
||||
(if p
|
||||
(intern (subseq upper (1+ (position #\: name :from-end t)))
|
||||
(subseq upper 0 p))
|
||||
(intern upper))))
|
||||
|
||||
(defun qml-apply (function arguments)
|
||||
(let ((value (apply (intern (string-upcase function)) arguments)))
|
||||
(let ((value (apply (string-to-symbol function)
|
||||
arguments)))
|
||||
(if (stringp value)
|
||||
value
|
||||
(princ-to-string value))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue