NextPrevUpTopContentsIndex

objc-object-var-value

Function
Summary

Accesses an Objective-C instance variable.

Package

objc

Signature

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

Signature

(setf objc-object-var-value) value object var-name => value

Arguments

object

A object of type standard-objc-object .

var-name

A string.

result-pointer

A foreign pointer or nil .

Values

value

A value.

Description

The function objc-object-var-value returns 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 the result-pointer argument should be passed giving a pointer to a foreign object of the correct type that is filled with the value.

The corresponding setf function can be used to set 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 - 9 Mar 2006

NextPrevUpTopContentsIndex