All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 2 Objective-C Reference

objc-object-var-value Accessor

Summary

Accesses an Objective-C instance variable.

Package

objc

Signature

objc-object-var-value object var-name &key result-pointer => value

(setf objc-object-var-value) value object var-name &key result-pointer => value

Arguments
object
A object of type standard-objc-object.
var-name
A string.
result-pointer
A foreign pointer or nil.
value
A value.
Values
value
A value.
Description

The accessor objc-object-var-value gets or gets the value of the instance variable var-name in the Objective-C foreign object associated with object. The type of value depends on the declared type of the instance variable. If this type is a foreign structure type, then result-pointer should be supplied to the reader, giving a pointer to a foreign object of the correct type that is filled with the value.

Note that it is only possible to access instance variables that are defined in Lisp by define-objc-class, not those inherited from superclasses implemented in Objective-C.

See also

standard-objc-object
define-objc-class


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 01 Dec 2021 19:38:32