
The C-level API
467
■
Typically, this argument is passed in and converted using the
JS_ValueToObject()
function.
Returns
A pointer to a null-terminated string. The caller should not free this string when it finishes.
JSObject *JS_NewArrayObject()
Description
This function creates a new object that contains an array of
JSVals
.
Arguments
JSContext
*cx
,
unsigned int
length
,
jsval
*v
■
The
cx
argument is the opaque
JSContext
pointer that passes to the JavaScript function.
■
The
length
argument is the number of elements that the array can hold.
■
The
v
argument is an optional pointer to the
jsvals
to be stored in the array. If the
return value is not
null
,
v
is an array that contains
length
elements. If the return value is
null
, the initial content of the array object is undefined and can be set using the
JS_SetElement()
function.
Returns
A pointer to a new array object or the value
null
upon failure.
long JS_GetArrayLength()
Description
Given a pointer to an array object, this function gets the number of elements in the array.
Arguments
JSContext
*cx
,
JSObject
*obj
■
The
cx
argument is the opaque
JSContext
pointer that passes to the JavaScript function.
■
The
obj
argument is a pointer to an array object.
Returns
The number of elements in the array or -1 upon failure.
Summary of Contents for DREAMWEAVER 8-EXTENDING DREAMWEAVER
Page 1: ...Extending Dreamweaver...
Page 8: ...8 Contents...
Page 14: ...14 Introduction...
Page 16: ......
Page 54: ...54 Customizing Dreamweaver...
Page 96: ...96 Customizing Code View...
Page 98: ......
Page 110: ...110 Extending Dreamweaver...
Page 138: ......
Page 166: ...166 Insert Bar Objects...
Page 180: ...180 Commands...
Page 248: ...248 Toolbars...
Page 260: ...260 Reports...
Page 278: ...278 Tag Libraries and Editors...
Page 288: ...288 Property Inspectors...
Page 378: ...378 Server Behaviors...
Page 398: ...398 Data Sources...
Page 432: ...432 Server Models...
Page 456: ...456 Data Translators...
Page 482: ......
Page 492: ...492 The Shared Folder...