Note: Do not modify the returned buffer pointer, or you might corrupt the data structures of the
JavaScript interpreter.
Arguments
JSObject *obj
•
Typically, this argument is passed in and converted using the
Returns
A pointer to a null-terminated string. The caller should not free this string when it finishes.
JSObject *JS_NewArrayObject()
Usage
JSObject *JS_NewArrayObject( JSContext *cx, unsigned int length [, jsval *v ] )
Description
Method; creates a new object that contains an array of
Arguments
JSContext *cx
•
The
argument is the opaque
cx
•
The
argument is the number of elements that the array can hold.
length
•
The
argument is an optional pointer to the
v
value is not
null
the initial content of the array object is undefined and can be set using the
JS_SetElement()
Returns
A pointer to a new array object or the value
long JS_GetArrayLength()
Usage
long JS_GetArrayLength(JSContext *cx, JSObject *obj)
Description
Method; given a pointer to an array object, gets the number of elements in the array.
Arguments
JSContext *cx
•
The
argument is the opaque
cx
•
The
argument is a pointer to an array object.
obj
Returns
The number of elements in the array or -1 upon failure.
,
unsigned int length
JSContext
,
is an array that contains
v
function.
,
JSObject *obj
JSContext
.
JSVals
,
jsval *v
pointer that passes to the JavaScript function.
to be stored in the array. If the return
jsvals
elements. If the return value is
length
upon failure.
null
pointer that passes to the JavaScript function.
JS_ValueToObject()
The C-level API
function.
,
null
383
Need help?
Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?