stuck over accepting values ..

Daniel Kochmański daniel at turtleware.eu
Thu Jan 16 08:01:19 UTC 2020


Hey Greg,

your code doesn't comiple for me. i.e application frame definition
doesn't have the layouts section. Also it seems that your McCLIM version
is over one year old while in a meantime the codebase had numerous
improvements.

Regarding accepting values, first I've wanted to give you a small
snippet, but it resulted in the issue created:
https://github.com/McCLIM/McCLIM/issues/941

Either way it would be helpful if you could provide a verbal description
what you want to achieve. Here is how you could i.e accept an integer
from inside the application frame:

(in-package clim-user)

(define-application-frame frame-which-accepts-values ()
  ((accepted-integer :initform nil :accessor accepted-integer))
  (:pane :application
   :display-function (lambda (frame pane)
                       (format pane "Hey!~%")
                       (format pane "Accepted integer is: ~s~%" (accepted-integer frame))
                       (with-output-as-gadget (pane)
                         (make-pane :push-button
                                    :label "Accept integer!"
                                    :activate-callback
                                    (lambda (gadget)
                                      (setf (accepted-integer frame)
                                            (accepting-values (stream :own-window t)
                                              (fresh-line stream)
                                              (accept 'integer :stream stream)))
                                      (redisplay-frame-pane frame pane))))
                       (terpri pane)
                       (format pane "Bye!~%"))))

(run-frame-top-level (make-application-frame 'frame-which-accepts-values))

Best regard,
Daniel

--
Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland
TurtleWare - Daniel Kochmański      | www.turtleware.eu

"Be the change that you wish to see in the world." - Mahatma Gandhi



More information about the mcclim-devel mailing list