Pergunta

I try to redo parenscript example. I perform the following command in emacs+sbcl+slime:

(ql:quickload :parenscript)
(defpackage :test)
  (:use :cl :parenscript))
(in-package :test)

Then I compile the example:

(defun validate-game-name (evt)
 (when (= (@ add-form name value) "")
  (chain evt (prevent-default))
  (alert "Please enter a name.")))

and got the following error:

style-warning: undefined function: @
warning: undefined variable: ADD-FORM
warning: undefined variable: NAME
warning: undefined variable: VALUE

What is wrong here?

Foi útil?

Solução 2

OK. Following Philipp's comment, i get it to compile in context with:

(ps
  (defun validate-game-name (evt)
  (when (= (@ add-form name value) "")
  (chain evt (prevent-default))
  (alert "Please enter a name."))))

Outras dicas

(defpackage :test)

the defpackage form is closed already, without using any package.

what is this then:

(:use :cl :parenscript))
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top