[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
parameter specializer (eql object) -- I'm confused
- To: comp-lang-lisp-mcl@services.cambridge.apple.com
- Subject: parameter specializer (eql object) -- I'm confused
- From: pshannon@iapetus.cv.nrao.edu (Paul Shannon)
- Date: Tue, 21 Jun 1994 01:12:19 GMT
- Newsgroups: comp.lang.clos, comp.lang.lisp.mcl
- Organization: nrao
- Sender: news@saips.cv.nrao.edu
- Xref: services.cambridge.apple.com comp.lang.clos:2074 comp.lang.lisp.mcl:5594
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)
Specifically:
(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?
Thanks.
- Paul Shannon
pshannon@nrao.edu
National Radio Astronomy Observatory
Charlottesville, Virginia