[Openmcl-devel] How to make lisp slots in an objc class
Oliver Markovic
entrox at entrox.org
Sat Mar 13 11:09:00 PST 2004
On 13.03.2004, at 17:55, Anders Conradi wrote:
> 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 >
I think this is due to a simple copy&paste bug in objc-clos.lisp, which
has already been fixed in CVS.
Try applying the attached patch (but apparently slots still need to be
bound when instantiating.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writer-method.patch
Type: application/octet-stream
Size: 525 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20040313/ec4fb0e4/attachment.obj>
-------------- next part --------------
--
Oliver Markovic
More information about the Openmcl-devel
mailing list