[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no-applicable-method

	(no-applicable-method generic-function first-argument &rest

    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))

(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

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.