I have the following code entered in the interpreter:
----------8<---------------
(define-class <window> (<object>) (window-handle))
(define-class <my-window> (<window>) ())
(define-class <expose-event> () ())
(define-generic handle-event)
(define-method (handle-event w type)
(display w)
(display " ")
(display type))
(define-method (handle-event (w <my-window>) (e <expose-event>))
(display "test"))
----------8<---------------
The following gives an error:
(handle-event 1 2)
=> Error: call-next-method: no methods left: #<procedure>
If I comment out the last define-method specialised on <my-window> then
(handle-event 1 2) works as expected.
If I specialize the first handle-event on <number> things also work. It only
seems to occur if there is a method which has no specializers at all.
How do I create a method that is always called no matter what type is passed?