A symbol or list naming the return type or an object to contain the returned value.
A string naming an Objective-C class or a pointer to an Objective-C foreign object.
A string naming the method to invoke.
Arguments to the method.
The function invoke-into
is used to call Objective-C instance and class methods that return specific types which are not supported directly by invoke or for methods that return values of some foreign structure type where an existing object should be filled with the value. The meaning of the class-or-object-pointer, method and args is identical to invoke.
The value of result controls how the value of the method is converted and returned as follows:
If the result type of the method is id
, then the value is assumed to be an Objective-C object of class NSString
and is converted a string and returned. Otherwise no special conversion is performed.
If the result type of the method is id
, then the value is assumed to be an Objective-C object of class NSArray
and is converted a vector and returned. Otherwise no special conversion is performed.
a list of the form (array
elt-type)
If the result type of the method is id
, then the value is assumed to be an Objective-C object of class NSArray
and is recursively converted a vector and returned. The component elt-type should be either string
, array
or another list of the form (array
sub-elt-type)
and is used to control the conversion of the elements.
Otherwise no special conversion is performed.
If the result type of the method is unsigned char *
, then the value is returned as a pointer of type objc-c-string.
Otherwise no special conversion is performed.
a list of the form (:pointer
elt-type)
If the result type of the method is unsigned char *
, then the value is returned as a pointer with element type elt-type.
Otherwise no special conversion is performed.
a pointer to a foreign structure
If the result type of the method is a foreign structure type defined with define-objc-struct or a built-in structure type such as NSRect
, the value is copied into the structure pointed to by result and the pointer is returned. Otherwise no special conversion is performed.
If the result type of the method is id
, then the value is assumed to be an Objective-C object of class NSArray
and is converted to fill the vector, which must be at least as long as the NSArray
. The vector is returned.
If the result type of the method is NSRect
, NSSize
or NSPoint
then the first 4, 2 or 2 elements respectively of the vector are set to the corresponding components of the result. The vector is returned.
Otherwise no special conversion is performed.
If the result type of the method is NSRange
then the car
of the cons is set to the location of the range and the cdr
of the cons is set to the length of the range. The cons is returned.
LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 15 Feb 2015