writing text to capi output pane
I have found a frustrating problem that shows up with this simple test code.
I define an interface with this code:
(capi:define-interface test1 ()
;; ----- slots ----
()
;; ----- panes ----
(:panes
(screen-out capi:output-pane
:internal-border nil :visible-border nil
:font (gp:make-font-description :family "Eurostile Regular/Black" :size 12)
:min-height 600
:max-height 600
:min-width 800
:max-width 800
:background :white
:foreground :black ))
;; ----- layouts ----
(:layouts
(main-layout capi:simple-layout '(screen-out)))
;; ----- defaults ----
(:default-initargs :layout 'main-layout
:destroy-callback #'(lambda (interface)
(capi:destroy interface))))
And with this test function, the window is displayed, but the text is not
output to the pane:
(defun exec-test ()
(let ((intf))
(setq intf (capi:display (make-instance 'test1)))
(with-slots (screen-out) intf
(gp:draw-string screen-out "test string out" 15 30 :foreground :blue))))
Here is another test function which also does not display the text:
(defvar *interface*)
(defun disp-test ()
(setq *interface* (capi:display (make-instance 'test1)))
(with-slots (screen-out) *interface*
(gp:draw-string screen-out "test string out" 15 30 :foreground :red)))
However, if the define-interface is run and I run the follow commands through
the REPL, the text is displayed
(setq interface (capi:display (make-instance 'test1)))
(with-slots (screen-out) interface (gp:draw-string screen-out "test string out"
15 30 :foreground :blue))
Anyone with some understanding of why the simple functions aren't working but
will run directly from the listener??
Thanks