[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] tinyclos question
From: |
Chris Double |
Subject: |
[Chicken-users] tinyclos question |
Date: |
Sun, 6 Apr 2003 03:17:16 +1200 |
User-agent: |
KMail/1.4.3 |
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?
Chris.
- [Chicken-users] tinyclos question,
Chris Double <=