Question

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?

Was it helpful?

Solution 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."))))

OTHER TIPS

(defpackage :test)

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

what is this then:

(:use :cl :parenscript))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top