vydd / sketch

A Common Lisp framework for the creation of electronic art, visual design, game prototyping, game making, computer graphics, exploration of human-computer interaction, and more.
MIT License
1.39k stars 66 forks source link

Input methods do not work #171

Closed HiPhish closed 2 months ago

HiPhish commented 2 months ago

Hello, I have been going through the tutorial and the input examples do not work for me. Here is the first input example from the tutorial:

(ql:quickload :sketch)
(use-package :sketch)

(defsketch input-test ((title "Hello, input")
                       (rectangles nil))
 (loop for (x y) in rectangles
       do (rect x y 50 50)))

(defmethod on-click ((window input-test) x y)
  (with-slots (rectangles) window
    (push (list x y) rectangles)))

(make-instance 'input-test)

The method does not get called. Even if I intentionally place an error like (error "intentional") at the start of the method body nothing happens on click.

I am running the following software:

Kevinpgalligan commented 2 months ago

Hello, you're probably seeing the same issue as this person: https://github.com/vydd/sketch/issues/167

Basically, there hasn't been a quicklisp update in a long time, so the version of Sketch in the main quicklisp distribution has fallen out of sync with the latest version in the repo. You could try switching to the ultralisp distribution, which updates frequently. Or you could clone the repo into your quicklisp local-projects folder (or whatever it's called).

HiPhish commented 2 months ago

Thank you, I'll close this issue then.