[Openmcl-devel] ObjC callbacks - self and dynamic extent
alexcrain at mail.widgetworks.com
Thu Feb 10 21:00:40 UTC 2005
This doesn't work...
? (defvar *x* nil)
? (define-objc-method ((:void my-method sender) my-class)
(setq *x* sender))
#<BOGUS object @ #xCE63E>
Not what I had in mind. I gather from reading the lisp kernel code that
dereferenced off the stack, my question is how to get it off without
copying the object.
I can to some hackery like this (for NSDocuments)
(send (send (send self 'window-controllers) :object-at-index 0)
Which works, but I can't believe that there isn't an easier way.
More information about the Openmcl-devel