sq_getmemberhandle |
SQRESULT sq_getmemberhandle(
HSQUIRRELVM v, SQInteger idx, HSQMEMBERHANDLE* handle)
;
pops a value from the stack and uses it as index to fetch the handle of a class member. The handle can be later used to set or get the member value using sq_getbyhandle(),sq_setbyhandle().
- parameters:
-
- HSQUIRRELVM v
-
the target VM
- SQInteger idx
-
an index in the stack pointing to the class
- HSQMEMBERHANDLE* handle
-
a pointer to the variable that will store the handle
- return:
-
a SQRESULT
- remarks:
-
This method works only with classes and instances. A handle retrieved through a class can be later used to set or get values from one of the class instances and vice-versa. Handles retrieved from base classes are still valid in derived classes and respect inheritance rules.