define-objc-class-method ( name result-type [ result-style ]) ( object-argspec argspec *) form *
A string naming the method to define.
An Objective-C FLI type.
An optional keyword specifying the result conversion style, either
:lisp
or
:foreign
.
A symbol naming a variable.
A symbol naming a class defined with define-objc-class.
An optional symbol naming a variable.
A symbol naming a variable.
An Objective-C FLI type.
An optional symbol or list specifying the argument conversion style.
A form.
The macro
define-objc-class-method
defines the Objective-C class method
name
for the Objective-C classes associated with
class-name
. The
name
should be a concatenation of the message name and its argument names, including the colons, for example
"setWidth:height:"
.
If the define-objc-class definition of
class-name
specifies the
(:objc-class-name
objc-class-name
)
option, then the method is added to the Objective-C class
objc-class-name
. Otherwise, the method is added to the Objective-C class of every subclass of
class-name
that specifies the
:objc-class-name
option, allowing a mixin class to define methods that become part of the implementation of its subclasses (see Abstract classes).
When the method is invoked, each form is evaluated in sequence with object-var bound to the (sub)class of class-name , pointer-var (if specified) bound to the receiver foreign pointer to the Objective-C class and each arg-var bound to the corresponding method argument.
See define-objc-method for details of the argument and result conversion.
The
form
s can use functions such as invoke to invoke other class methods on the
pointer-var
. The macro current-super
can be used to obtain an object that allows class methods in the superclass to be invoked (like
super
in Objective-C).