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

parameter specializer (eql object) -- I'm confused

I would like to be able to specialize a method on the value of
an object, like this:

    (defmethod dispatch ((eql "Save"))

I can't get this to work under Macintosh Common Lisp (2.0.1)

(defmethod dispatch-callback ((eql "Apple") (eql "Save"))
  (format t "dispatch-callback:  apple, save~%"))

Error: Illegal arg "Apple"

I guess I've misconstrued this kind of parameter specializer.  Keene's
book (as far as I can tell) doesn't present examples.  

Any advice?


 - Paul Shannon
   National Radio Astronomy Observatory
   Charlottesville, Virginia