[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: no-applicable-method
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Re: no-applicable-method
- From: Danny Bobrow <Bobrow.pa@Xerox.COM>
- Date: 2 Oct 87 13:50 PDT
- Cc: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- In-reply-to: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>'s message of Fri, 2 Oct 87 14:03 EDT
- Sender: Bobrow.pa@Xerox.COM
(no-applicable-method generic-function first-argument &rest
all-arguments)
This all looks fine except for what I think is a bug in the example.
I thought we already changed the definition from
(defgeneric no-applicable-method (generic-function first-argument
&rest all-arguments))
to
(defgeneric no-applicable-method (generic-function all-arguments))
I agree. One must redefine no-applicable-method to call another generic
function that is specialized on the first argument.
(defmethod no-applicable-method (generic-function all-arguments)
(forward-message (car all-arguments) *elsewhere*
(list generic-function all-arguments)))
where the forwarder type understands the method forward-message, and no
other.
Alternatively, no-applicable-method could search the argument list for
an element of the forwarder class to send the message to, else signal an
error. This would not make it so dependent on the first argument.