fukamachi / event-emitter

Event mechanism for Common Lisp objects.
BSD 2-Clause "Simplified" License
28 stars 8 forks source link

slot-value not required to work on structures #9

Open Zulu-Inuoe opened 4 years ago

Zulu-Inuoe commented 4 years ago

In Corman Lisp:

?(defstruct (person (:include event-emitter:event-emitter*)) name)
PERSON
?(event-emitter:on :name-change (make-person) (lambda (new-name) (format t "New name:~A~%" new-name)))
;;; An error of type SIMPLE-ERROR was detected in function STD-SLOT-VALUE:
;;; Error: The slot COMMON-LISP::EFFECTIVE-SLOTS is missing from the class #<Standard-Class STRUCTURE-CLASS #x36B93E8>.
;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1   Abort to top level.