Article View: comp.lang.clos
Article #621Redefining FORMAT
From: Marco Ramoni
Date: Tue, 11 Jun 1991 15:11
Date: Tue, 11 Jun 1991 15:11
29 lines
1545 bytes
1545 bytes
I have defined a class named text-window and I am attempting to write a specialized version of format. My definition is:
(defmethod format ((tw text-window) string &rest arguments)
"Specialized format for text-windows."
(print-string-in-window tw (eval `(format nil ,string ,@arguments)))
)
When I load the file containing this definition I get the following error:
>>Error: FORMAT already names an ordinary function or a macro
LUCID-RUNTIME-SUPPORT:DEFINE-METHOD:
Required arg 0 (...
Required arg 1 (...
...
0: Flush the existing definition
1: Convert current definition into default method
:C 2: Try loading "..." again
...
...
If I choose option 1 everythig works fine, I get exactly what I want (that is, both the old version and the specialized one). My problem is, is there a way of getting rid of the error message? In other words, can I "Convert the current definition into default method" directly from my program?
My Email address is: alb@ipvaim.unipv.it. Thank you in advance.
Alberto Riva
University of Pavia, Italy
Technical Details
Message-ID:
<marco.676653088@ipvvis>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!ghost.unimi.it!hplda1.unipv.it!ipvvis!marcoShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.clos Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!ghost.unimi.it!hplda1.unipv.it!ipvvis!marco From: marco@ipvvis.unipv.it (Marco Ramoni) Subject: Redefining FORMAT Message-ID: <marco.676653088@ipvvis> Keywords: defmethod format Sender: usenet@hplda1.unipv.it (Usenet News Administration) Nntp-Posting-Host: ipvvis Organization: Universita' di Pavia - Italy Date: 11 Jun 91 15:11:28 GMT Lines: 29