Good day from Greg Bennett who is running sbcl-1.5.8 in emacs under linux mint 19.2 64-bit and mcclim code from mcclim-20191008-get via quicklisp.
I am trying to understand some of the mcclim examples which use accepting-values. In my case the code is in ...../mcclim-20191008-git/Examples/accepting-values.lisp
At the top of this file there is this note: ;;; Some simple examples from the Franz user manual. You can run ;;; these from the listener.
Thus encouraged, I tried some of these after loading the demo asdf. For example, I tried to use (defun accept-popup (seq &key (stream *query-io*)) (let ((val (elt seq 0)) (ptype `(completion ,seq))) (accepting-values (stream) (setq val (accept ptype :stream stream :view climi::+pop-up-menu-view+ :prompt "Choose one:" :default val))) val)) ;; via (accept-popup (list 3 5 7 9))
In every instance I fail with:
There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2)> when called with arguments (#<SYNONYM-STREAM :SYMBOL SWANK::*CURRENT-QUERY-IO* {10016D0A93}>). [Condition of type SB-PCL::NO-APPLICABLE-METHOD-ERROR]
which, I think, means that my difficulty lies in the interface between emacs (swank) and the form I'm experimenting with, even 'though that code runs perfectly when invoked in (demodemo). In particular, the invocation of *query-io* (which evaluates to the #<SYNONYM-STREAM :SYMBOL SWANK::*CURRENT-QUERY-IO* {10016D0A93}> of the error is evidently something which I am getting wrong.
I should be grateful to learn how be able to run the elements of (demodemo) from a listener (connected to lisp via emacs)
Cheers /Greg
Hey Greg,
gwbennett writes:
I should be grateful to learn how be able to run the elements of (demodemo) from a listener (connected to lisp via emacs)
The problem comes from the fact, that SWANK stream is not a CLIM-STREAM. While it would be certainly a cool thing to have at least some interfaces work on arbitrary streams, it is not something we aim at currently. This comment by listener means the CLIM listener which has more features than "ordinary" text stream: you may position cursor wherever you want, you may clean part of the stream etc etc. Please try:
cl-user> (asdf:load-system 'clim-listener) cl-user> (clim-listener:run-listener)
And try examples there.
Best regards, 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