Problems with ltk (common lisp)

Posted by Silvanus on Stack Overflow See other posts from Stack Overflow or by Silvanus
Published on 2010-03-14T17:42:10Z Indexed on 2010/03/14 17:45 UTC
Read the original article Hit count: 500

Filed under:
|
|

I installed ltk to Steel Bank Common Lisp with asdf-install, but I can't even start using it V_V. The code below is the simplest example in the documentation, and is copied almost verbatim.


asdf:operate 'asdf:load-op :ltk)

(defun hello-1()
  (with-ltk ()
   (let ((b (make-instance 'button
                           :master nil
                           :text "Press Me"
                           :command (lambda ()
                                      (format t "Hello World!~&")))))
     (pack b))))
(hello-1)

This is the error message I get from sbcl:


; in: LAMBDA NIL ; (PACK B) ; ; caught STYLE-WARNING: ; undefined function: PACK

; (WITH-LTK NIL ; (LET ((B (MAKE-INSTANCE 'BUTTON :MASTER NIL :TEXT "Press Me" :COMMAND #))) ; (PACK B))) ; ; caught STYLE-WARNING: ; undefined function: WITH-LTK ; ; compilation unit finished ; Undefined functions: ; PACK WITH-LTK ; caught 2 STYLE-WARNING conditions

debugger invoked on a SIMPLE-ERROR in thread #: There is no class named BUTTON.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level.

(SB-PCL::FIND-CLASS-FROM-CELL BUTTON NIL T)

© Stack Overflow or respective owner

Related posts about common-lisp

Related posts about lisp