diff --git a/doc/Slime-REPL-hook.htm b/doc/Slime-REPL-hook.htm
index 44a48d8..93695de 100644
--- a/doc/Slime-REPL-hook.htm
+++ b/doc/Slime-REPL-hook.htm
@@ -9,9 +9,11 @@
Slime REPL Hook
+
Please note:
You need to enable this mode manually by uncommenting this line in eql-start-swank.lisp in your Slime directory:
-
(setf eql:*slime-mode* :repl-hook)
+
(setf eql:*slime-mode* :repl-hook)
+
Requires ECL threads.
This should work with any Slime version that plays together with ECL.
Tested with ECL 12.7.1 (Windows: ECL 12.12.1)
diff --git a/examples/M-modules/webkit/README.txt b/examples/M-modules/webkit/README.txt
index 5ce8dda..6762631 100644
--- a/examples/M-modules/webkit/README.txt
+++ b/examples/M-modules/webkit/README.txt
@@ -15,7 +15,7 @@ A list of features:
a simple example:
document.getElementById("x") // JavaScript
- (! "findFirstElement" (frame) "#x") ; Lisp
+ (|findFirstElement| (frame) "#x") ; Lisp
(passing QWebElements between JavaScript and Lisp is just native)
@@ -29,5 +29,9 @@ A list of features:
see QLOAD-C++)
-See directory "Tic-Tac-Toe/" for an example of a WebKit application.
+"Html Utils"
+============
+See directory "Tic-Tac-Toe/" for an example of a plain WebKit application,
+using only some simple convenience utility functions, defined in
+"Tic-Tac-Toe/h-utils.lisp".
diff --git a/examples/M-modules/webkit/Tic-Tac-Toe/h-utils.lisp b/examples/M-modules/webkit/Tic-Tac-Toe/h-utils.lisp
index acf99cc..d94eeb7 100644
--- a/examples/M-modules/webkit/Tic-Tac-Toe/h-utils.lisp
+++ b/examples/M-modules/webkit/Tic-Tac-Toe/h-utils.lisp
@@ -390,9 +390,7 @@
(element (ensure-web-element web-element)))
(assert (string= "IMG" (tag-name element)) nil
"Wanted
![]()
, got <~(~A~)>." (tag-name element))
- ;; HACK: we call the same JS function using 2 different names (see your Qt version)
- (js "Lisp.pixmap().assignTo(this)" element) ; new name (latest Qt 4.8)
- (js "Lisp.pixmap().assignToHTMLImageElement(this)" element))) ; original name (earlier versions)
+ (js "Lisp.pixmap().assignToHTMLImageElement(this)" element)))
(defun to-pixmap (web-element &optional scale-factor)
"Render web element into a pixmap, optionally scaling it."
diff --git a/gui/gui.lisp b/gui/gui.lisp
index 7c66d62..16d4194 100644
--- a/gui/gui.lisp
+++ b/gui/gui.lisp
@@ -46,6 +46,7 @@
*q-slots*
*q-super-classes*
*qt-tab*
+ *search-class*
*search-help*
*select*
*selected-widget*
@@ -75,10 +76,14 @@
(set-tree *primitives* 2 (tr "Qt/C++ type") (tr "Lisp example / type"))
;; please see example 9: editor.lisp for better completer examples
(let ((cpl (qnew "QCompleter")))
- (dolist (w (list *display* *edit* *package-name* *selected-widget* (! "popup" cpl)))
+ (dolist (w (list *display* *edit* *package-name* *selected-widget* *search-class* (! "popup" cpl)))
(qset w "font" *code-font*))
(! "setModel" cpl *completer-list*)
(! "setCompleter" *edit* cpl))
+ (let ((cpl (qnew "QCompleter(QStringList)" (qobject-names))))
+ (! "setCompletionMode" cpl |QCompleter.InlineCompletion|)
+ (! "setCaseSensitivity" cpl |Qt.CaseInsensitive|)
+ (! "setCompleter" *search-class* cpl))
(! "addItems" *q-names* (qobject-names :q))
(! "addItems" *n-names* (qobject-names :n))
(qconnect *q-super-classes* "linkActivated(QString)" 'change-class-q-object)
@@ -88,6 +93,7 @@
(qconnect *edit* "returnPressed()" 'eval-edit)
(qconnect *select* "clicked()" (lambda () (qselect 'widget-selected)))
(qconnect *properties* "clicked()" 'show-properties-dialog)
+ (qconnect *search-class* "returnPressed()" 'select-class)
(qconnect *search-help* "textChanged(QString)" 'search-help)
(qconnect *search-help* "returnPressed()" 'search-help)
(qoverride *edit* "keyPressEvent(QKeyEvent*)" 'history-move)
@@ -166,6 +172,17 @@
(set-listen t)
(! "setOverrideCursor" "QGuiApplication" cross-cursor)))
+(defun select-class ()
+ (flet ((set-tab-index (i)
+ (! "setCurrentIndex" *qt-tab* i)))
+ (let ((name (! "text" *search-class*)))
+ (cond ((find name (qobject-names :q) :test 'string=)
+ (set-tab-index 0)
+ (change-class-q-object name :super))
+ ((find name (qobject-names :n) :test 'string=)
+ (set-tab-index 1)
+ (change-class-n-object name :super))))))
+
(defun change-class-q-object (s &optional super)
(let ((i (! "findText" *q-names* s)))
(if (= -1 i)
diff --git a/gui/gui.ui b/gui/gui.ui
index 7b21718..ba27e97 100644
--- a/gui/gui.ui
+++ b/gui/gui.ui
@@ -78,11 +78,38 @@
Qt
-
+
+ -
+
+
-
+
+
+
+ 1
+ 0
+
+
+
+
+ -
+
+
+
+ 2
+ 0
+
+
+
+ Type class name and hit Return
+
+
+
+
+
-
- 0
+ 1
@@ -322,10 +349,23 @@
-
-
-
+
+
+
+ 1
+ 0
+
+
+
-
+
+
+ 2
+ 0
+
+
Hit Return to find next