Hello all!
I am trying to get into mcCLIM to write a frontend to a text (news) analysis tool... I use CMUCL and have followed the INSTALL.CMU file and most of the demos work fine. But as I get down to it and start writing code to use "accepting-values" for instance I get the message below. I also get it when running the demos so i assume that something is wrong with the environment... but what? It's probably something simple but I have tried to figgure it out for a lot of hours and some ideas would be greatly appreciated!
Thanks,
/Peter
PS I tried wihout SLIME but that didn't work either. See second trace below.
CL-USER> (clim-demo::accepting-interval)
No matching method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58BBC3B9}>, when called with arguments (#<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>>). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]
Restarts: 0: [CONTINUE] Retry call to :FUNCTION. 1: [ABORT] Abort handling SLIME request. 2: [ABORT] Return to Top-Level.
Backtrace: 0: ("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<#1=unused-arg> #<#1#> #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58BBC3B9}> (#<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>>)) 1: (CLIM-INTERNALS::INVOKE-ACCEPTING-VALUES #<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>> #<Closure Over Function (FLET #:ACCEPTING-VALUES-CONTINUATION1 CLIM-DEMO::ACCEPTING-INTERVAL) {58A68171}> :OWN-WINDOW #<unused-arg> ...) 2: (CLIM-DEMO::ACCEPTING-INTERVAL :MIN -1.0 :MAX 1.0 ...) 3: (SWANK::EVAL-REGION "(clim-demo::accepting-interval)" T) 4: ("DEFSLIMEFUN LISTENER-EVAL")
_____________________TRACE WITHOUT SLIME ________________________________________
* (clim-demo::accepting-interval)
No matching method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58B61979}>, when called with arguments (#<Synonym Stream to *TERMINAL-IO*>). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]
Restarts: 0: [CONTINUE] Retry call to :FUNCTION. 1: [ABORT ] Return to Top-Level.
Debug (type H for help)
("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<unused-arg> #<unused-arg> #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58B61979}> (#<Synonym Stream to *TERMINAL-IO*>)) Source: ; File: target:pcl/braid.lisp (CERROR "Retry call to ~S." 'NO-APPLICABLE-METHOD-ERROR :FUNCTION GENERIC-FUNCTION ...) 0]
Peter Braroe wrote:
Hello all!
I am trying to get into mcCLIM to write a frontend to a text (news) analysis tool... I use CMUCL and have followed the INSTALL.CMU file and most of the demos work fine. But as I get down to it and start writing code to use "accepting-values" for instance I get the message below. I also get it when running the demos so i assume that something is wrong with the environment... but what? It's probably something simple but I have tried to figgure it out for a lot of hours and some ideas would be greatly appreciated!
You can only call CLIM input/output functions with CLIM streams as arguments, so you can't use them interactively in a SLIME buffer or at the command line. I should add that of course you can launch CLIM applications there. However, you can do interactive CLIM experiments (very productive!) with the Lisp Listener application in the Apps directory.
Tim
Looking at your backtrace, it appears that accepting-values is being called on a stream from SLIME rather than a CLIM stream, so naturally there are no applicable methods. CLIM usually binds *standard-input* and *standard-output* to reasonable defaults (see frame-standard-input, frame-standard-output which make this choice). I don't know why that isn't happening here without seeing your code, maybe it is running in an unusual context (like before the frame toplevel binds those stream variables, or in an event handler). In any case, all you need to do is obtain the appropriate CLIM streams (via any of frame-standard-input, get-frame-pane, etc) for your window and write to those.
On 2/1/06, Peter Braroe peter.braroe@newsmachine.com wrote:
Hello all!
I am trying to get into mcCLIM to write a frontend to a text (news) analysis tool... I use CMUCL and have followed the INSTALL.CMU file and most of the demos work fine. But as I get down to it and start writing code to use "accepting-values" for instance I get the message below. I also get it when running the demos so i assume that something is wrong with the environment... but what? It's probably something simple but I have tried to figgure it out for a lot of hours and some ideas would be greatly appreciated!
Thanks,
/Peter
PS I tried wihout SLIME but that didn't work either. See second trace below.
CL-USER> (clim-demo::accepting-interval)
No matching method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58BBC3B9}>, when called with arguments (#<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>>). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]
Restarts: 0: [CONTINUE] Retry call to :FUNCTION. 1: [ABORT] Abort handling SLIME request. 2: [ABORT] Return to Top-Level.
Backtrace: 0: ("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<#1=unused-arg> #<#1#> #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58BBC3B9}> (#<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>>)) 1: (CLIM-INTERNALS::INVOKE-ACCEPTING-VALUES #<Two-Way Stream, Input = #SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}, Output = #<Stream for descriptor 7>> #<Closure Over Function (FLET #:ACCEPTING-VALUES-CONTINUATION1 CLIM-DEMO::ACCEPTING-INTERVAL) {58A68171}> :OWN-WINDOW #<unused-arg> ...) 2: (CLIM-DEMO::ACCEPTING-INTERVAL :MIN -1.0 :MAX 1.0 ...) 3: (SWANK::EVAL-REGION "(clim-demo::accepting-interval)" T) 4: ("DEFSLIMEFUN LISTENER-EVAL")
_____________________TRACE WITHOUT SLIME ________________________________________
- (clim-demo::accepting-interval)
No matching method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58B61979}>, when called with arguments (#<Synonym Stream to *TERMINAL-IO*>). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]
Restarts: 0: [CONTINUE] Retry call to :FUNCTION. 1: [ABORT ] Return to Top-Level.
Debug (type H for help)
("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<unused-arg> #<unused-arg> #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58B61979}> (#<Synonym Stream to *TERMINAL-IO*>)) Source: ; File: target:pcl/braid.lisp (CERROR "Retry call to ~S." 'NO-APPLICABLE-METHOD-ERROR :FUNCTION GENERIC-FUNCTION ...) 0]
mcclim-devel mailing list mcclim-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
Hello!
Well what I was trying to do was to run the example as I didn't trust my own code! So from SLIME i (as described in the documentation) invoked:
(clim-demo::accepting-interval)
The same thing didn't work when trying directly when loading CMUCL from the command line... The above code is same as in the 0.9.1 distro.
Perhpas this has something to do with the multiprocessing? Forgive my naivete but I am a newbie to LISP. I tried to do (mp::startup-idle-and-top-level-loops) but that doesnt seem to work (just says "no value") with SLIME so i have googled and instead set the elisp variable slime-multiprocessing to t. I don't know if this is the same or how to chech which processes are active - is there some kind of "top" for LISP? Any pointers to good documentation here? I have found clim-ug.pdf and expect to do some serious weekend reading.
Are you guys using slime? what I basically want to do as a first step is to create a command called "tree-draw" which draws a tree diagram of my data from the slime command line.
What is the best way to create a window so I can do some simple stuff like (clim:draw-line* *my-sheet* 200 10 10 150) to make my tree diagram. I wan't the tree drawing to use data created by running previous commands from the slime command line.
Later I want to create a full app with a root window and child windows for different graphs, status info, configuration dialogs and other things. Any ideas on where I can find sources for a more full bodied app to look at and lean from?
Thanks for your help so far!
/Peter
PS CLIM seems cool, a lot more elegant than programming in Java for instance. But it seems a bit hard to get into due to lack of newbie style documentation - I am happy to write together the feedback and collection of "non-obvious but simple" stuff that an beginner needs to know for publication somewhere suitable! Good idea?
What works for me: gadget-test calculator
On Wed, 2006-02-01 at 13:19 -0500, Andy Hefner wrote:
Looking at your backtrace, it appears that accepting-values is being called on a stream from SLIME rather than a CLIM stream, so naturally there are no applicable methods. CLIM usually binds *standard-input* and *standard-output* to reasonable defaults (see frame-standard-input, frame-standard-output which make this choice). I don't know why that isn't happening here without seeing your code, maybe it is running in an unusual context (like before the frame toplevel binds those stream variables, or in an event handler). In any case, all you need to do is obtain the appropriate CLIM streams (via any of frame-standard-input, get-frame-pane, etc) for your window and write to those.
On 2/1/06, Peter Braroe peter.braroe@newsmachine.com wrote:
Hello all!
I am trying to get into mcCLIM to write a frontend to a text (news) analysis tool... I use CMUCL and have followed the INSTALL.CMU file and most of the demos work fine. But as I get down to it and start writing code to use "accepting-values" for instance I get the message below. I also get it when running the demos so i assume that something is wrong with the environment... but what? It's probably something simple but I have tried to figgure it out for a lot of hours and some ideas would be greatly appreciated!
Thanks,
/Peter
PS I tried wihout SLIME but that didn't work either. See second trace below.
CL-USER> (clim-demo::accepting-interval)
No matching method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58BBC3B9}>, when called with arguments (#<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>>). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]
Restarts: 0: [CONTINUE] Retry call to :FUNCTION. 1: [ABORT] Abort handling SLIME request. 2: [ABORT] Return to Top-Level.
Backtrace: 0: ("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<#1=unused-arg> #<#1#> #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58BBC3B9}> (#<Two-Way Stream, Input = #<SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}>, Output = #<Stream for descriptor 7>>)) 1: (CLIM-INTERNALS::INVOKE-ACCEPTING-VALUES #<Two-Way Stream, Input = #SWANK-BACKEND::SLIME-INPUT-STREAM {58B7D7B5}, Output = #<Stream for descriptor 7>> #<Closure Over Function (FLET #:ACCEPTING-VALUES-CONTINUATION1 CLIM-DEMO::ACCEPTING-INTERVAL) {58A68171}> :OWN-WINDOW #<unused-arg> ...) 2: (CLIM-DEMO::ACCEPTING-INTERVAL :MIN -1.0 :MAX 1.0 ...) 3: (SWANK::EVAL-REGION "(clim-demo::accepting-interval)" T) 4: ("DEFSLIMEFUN LISTENER-EVAL")
_____________________TRACE WITHOUT SLIME ________________________________________
- (clim-demo::accepting-interval)
No matching method for the generic function #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58B61979}>, when called with arguments (#<Synonym Stream to *TERMINAL-IO*>). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR]
Restarts: 0: [CONTINUE] Retry call to :FUNCTION. 1: [ABORT ] Return to Top-Level.
Debug (type H for help)
("DEFMETHOD NO-APPLICABLE-METHOD (T)" #<unused-arg> #<unused-arg> #<STANDARD-GENERIC-FUNCTION CLIM:STREAM-CURSOR-POSITION (2) {58B61979}> (#<Synonym Stream to *TERMINAL-IO*>)) Source: ; File: target:pcl/braid.lisp (CERROR "Retry call to ~S." 'NO-APPLICABLE-METHOD-ERROR :FUNCTION GENERIC-FUNCTION ...) 0]
mcclim-devel mailing list mcclim-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
Peter Braroe peter.braroe@newsmachine.com writes:
Well what I was trying to do was to run the example as I didn't trust my own code! So from SLIME i (as described in the documentation) invoked:
(clim-demo::accepting-interval)
The same thing didn't work when trying directly when loading CMUCL from the command line... The above code is same as in the 0.9.1 distro.
Try evaluating the above form from the CLIM Listener.
things. Any ideas on where I can find sources for a more full bodied app to look at and lean from?
You might start here:
http://www.cl-user.net/asp/tags/clim
PS CLIM seems cool, a lot more elegant than programming in Java for instance. But it seems a bit hard to get into due to lack of newbie style documentation - I am happy to write together the feedback and collection of "non-obvious but simple" stuff that an beginner needs to know for publication somewhere suitable! Good idea?
You might consider joining some of the gardeners projects, or starting a new one:
CL Gardeners - Tending the Common Lisp garden http://www.lispniks.com/cl-gardeners/
Paolo