In a few cases, for instance when using nib files created by Apple's Interface Builder, it is necessary to add Objective-C instance variables to a class. This can be done using the
class option to define-objc-class. For example, the following class contains two instance variables, each of which is a pointer to an Objective-C foreign object:
(define-objc-class my-controller ()
Given an instance of
, the instance variables can be accessed using the function objc-object-var-value.