sq_setdelegate

Squirrel 2.2

sq_setdelegate

SQRESULT sq_setdelegate(HSQUIRRELVM v, SQInteger idx);

pops a table from the stack and sets it as delegate of the object at the position idx in the stack.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

index of the target object in the stack

return:

a SQRESULT

remarks:

to remove the delgate from an object is necessary to use null as delegate instead of a table.