[Openmcl-devel] How to make lisp slots in an objc class

Anders Conradi beque at telia.com
Sat Mar 13 08:55:25 PST 2004


Hi,

 From the documentation of the cooca bridge I got the impression that 
you can create objc classes that contains lisp slots. How are you 
supposed to do that?

This is what I have tried:

(defclass test-class (ns:ns-object)
   ((test-slot :accessor test-slot))
   (:metaclass ns:+ns-object))

This is what I get when trying to evaluate that expression in the REPL:

 > Error in process listener(1): No applicable method for args:
 >                                (#<OBJC:OBJC-CLASS TEST-CLASS 
(#x431910)> #<#<error printing STANDARD-READER-METHOD #x50ACD16> 
#<STANDARD-DIRECT-SLOT-DEFINITION for instance slot TEST-SLOT 
#x5BBCFBE>)
 >                                to #<STANDARD-GENERIC-FUNCTION 
CCL::CREATE-WRITER-METHOD-FUNCTION #x509B90E>
 > While executing: #<CCL::STANDARD-KERNEL-METHOD NO-APPLICABLE-METHOD 
(T)>
 > Type :POP to abort.
Type :? for other options.
1 >

// Anders




More information about the Openmcl-devel mailing list