At startup, tagger-app
should give the input focus to pane2
text-field. How can I do this?
(cl:eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :mcclim))
(defpackage :tagger
(:use #:clim-lisp #:clim))
(in-package :tagger)
(define-application-frame tagger-app () ()
(:panes
(pane1 :text-field)
(pane2 :text-field))
(:layouts
(default
(vertically ()
(labelling (:label "Pane 1") pane1)
(labelling (:label "Pane 2") pane2)))))
(defun run-tagger-app ()
(run-frame-top-level (make-application-frame 'tagger-app)))
(run-tagger-app)
I tried to study the CLIM documentation, but there are too much details.
jackdaniel, one of McCLIM maintainers, answered on #CLIM IRC group in this way
Note the usage of
:before
, instead of:after
, becauserun-frame-top-level
is not a "normal" method, returning immediately a result, but it is an always running loop (as the namerun-...
suggests), that will terminate when the frame passed as argument is closed.