[Openmcl-devel] Calling Obj-C methods defined in OpenMCL via the bridge?

Gary Byers gb at clozure.com
Fri Mar 9 21:44:09 PST 2007


Methods defined via DEFINE-OBJC-METHOD should be callable (via SEND)
from lisp code.

This is not unlike:

(defcallback add-ints (:int x :int y :int)
   (+ x y))


(ff-call add-ints :int 2 :int 2 :int)

which (a) an awkward way to add a couple of integers together and
(b) unlike the DEFINE-OBJC-METHOD case in the the latter case
involves some dispatching on the type of the receiver.

(I have a feeling that I'm missing something obvious in that response,
but can't guess what it might be.)



On Sat, 10 Mar 2007, Phil wrote:

> I was wondering if there is a preferred way to register methods
> (defined via define-objc-method) with the Obj-C bridge so that I can
> make loopback calls to the Lisp method from my Lisp code?  I
> understand that this is a less than optimal means to call the method
> but would like to do this for some code currently in Lisp which will
> be re-implemented in Obj-C down the road without impacting the
> calling code.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list