[Openmcl-devel] Error: The function PRINT is defined as something other than a generic function
Gary King
gwking at metabang.com
Sat Apr 2 06:31:52 PDT 2011
Hi Jason,
try print-object instead of print.
HTH,
On Apr 2, 2011, at 2:48 AM, Jason E. Aten wrote:
> I'm trying to define a print method for my class, and I'm getting "Error: The function PRINT is defined as something other than a generic function."
>
> Below shows the two commands that when issues, reproduce this on Linux x86_64. What should I try instead?
>
> Apologies if this is obvious. I'm new to CLOS, and these classes are auto- generated by SWIG as wrappers for C++ classes.
>
> Jason
>
> jaten at afarm:~/dj/ldc2swig$ ccl -n
> Welcome to Clozure Common Lisp Version 1.7-dev-r14684M-trunk (LinuxX8664)!
> ? (cl:defclass object()
> ((ff-pointer :reader ff-pointer)))
>
> #<STANDARD-CLASS OBJECT>
> ? (cl:defmethod print ((self object))
> (Object_dprint (ff-pointer self)))
>
> ;Compiler warnings :
> ; In (PRINT (OBJECT)) inside an anonymous lambda form: Undefined function OBJECT_DPRINT
>
> > Error: The function PRINT is defined as something other than a generic function.
>
>
> > While executing: ENSURE-GENERIC-FUNCTION, in process listener(1).
> > Type :GO to continue, :POP to abort, :R for a list of available restarts.
> > If continued: Try to remove any global non-generic function or macro definition.
> > Type :? for other options.
>
>
> 1 > :b
> (7FB61B6E6A10) : 0 (ENSURE-GENERIC-FUNCTION PRINT) 341
> (7FB61B6E6A40) : 1 (ENSURE-METHOD PRINT (#<STANDARD-CLASS OBJECT>) :FUNCTION #<Compiled Method-function (PRINT #) (Non-Global) #x30200056D4BF> :QUALIFIERS NIL :LAMBDA-LIST (S\
> ELF)) 285
> (7FB61B6E6AA8) : 2 (FUNCALL #'#<Anonymous Function #x3020005682BF>) 157
> (7FB61B6E6AB8) : 3 (TOPLEVEL-EVAL (DEFMETHOD PRINT (#) (OBJECT_DPRINT #)) NIL) 709
> (7FB61B6E6B60) : 4 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x30200055A9ED> :OUTPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x30200055A63D> :BREAK-LEVEL 0 :\
> PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global) #x30000059B38F>) 2317
> (7FB61B6E6DC0) : 5 (TOPLEVEL-LOOP) 109
> (7FB61B6E6DF0) : 6 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 117
> (7FB61B6E6E10) : 7 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 741
> (7FB61B6E6EB0) : 8 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x30200055776D> (#<COMPILED-LEXICAL-CLOSURE # #x302000556E8F>)) 717
> (7FB61B6E6F48) : 9 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x30200055776D> (#<COMPILED-LEXICAL-CLOSURE # #x3020\
> 00556E8F>)) 389
> (7FB61B6E6F98) : 10 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 301
> 1 >
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM * gwking on twitter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20110402/636527ad/attachment.htm>
More information about the Openmcl-devel
mailing list