[Openmcl-devel] How to access Objective-C propperties

Alexander Repenning ralex at cs.colorado.edu
Tue Dec 28 11:55:10 PST 2010


I am having a problem with accessing certain (10.6 and later) objective-C properties which I try to access via objc:objc-message-send

something like this works: (objc:objc-message-send some-event "magnification" #>CGFloat)



but when I specify an NSPoint return type things fall apart:

(objc:objc-message-send touch-return "normalizedPosition" #>NSPoint)


Error: (TOUCH-RETURN :<SEL> (OBJC:@SELECTOR "normalizedPosition")) should be an even-length list of alternating foreign types and values
> While executing: X8664::EXPAND-FF-CALL, in process Listener(6).


I have tried to replace  #>NSPoint with :id which does return something that Lisp does not like:

Error: Invalid memory operation.
> While executing: CCL::%SAFE-GET-PTR, in process Listener(6).


any suggestions on how to handle this via the bridge?

Alex




More information about the Openmcl-devel mailing list