JSBool JS_GetElement()
Usage
JSBool JS_GetElement(JSContext *cx, JSObject *obj, jsint idx, jsval *vp)
Description
Method; reads a single element of an array object.
Arguments
JSContext *cx
•
The
argument is the opaque
cx
•
The
argument is a pointer to an array object.
obj
•
The
argument is an integer index into the array. The first element is index 0, and the
index
last element is index (
•
The
argument is a pointer to a
v
should be copied.
Returns
A Boolean value:
JSBool JS_SetElement()
Usage
JSBool JS_SetElement(JSContext *cx, JSObject *obj, jsint idx, jsval *vp)
Description
Method; writes a single element of an array object.
Arguments
JSContext *cx, JSObject *obj, unsigned int index, jsval *v
•
The
argument is the opaque
cx
•
The
argument is a pointer to an array object.
obj
•
The
argument is an integer index into the array. The first element is index
index
last element is index (
•
The
argument is a pointer to a
v
in the array.
jsval
Returns
A Boolean value:
384
Chapter 4: C-Level Extensibility
,
,
JSObject *obj
unsigned int index
JSContext
).
length - 1
jsval
indicates success;
JS_TRUE
JSContext
).
length - 1
jsval
indicates success;
JS_TRUE
,
jsval *v
pointer that passes to the JavaScript function.
where the contents of the
indicates failure.
JS_FALSE
pointer that passes to the JavaScript function.
structure whose contents should be copied to the
indicates failure.
JS_FALSE
structure in the array
jsval
, and the
0
Need help?
Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?
Questions and answers