Adobe Extending Dreamweaver CS4 Instrukcja Użytkownika Strona 362

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 387
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 361
356
EXTENDING DREAMWEAVER CS4
C-level extensibility
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.
JSBool JS_GetElement()
Description
This function reads a single element of an array object.
Arguments
JSContext *cx, JSObject *obj, unsigned int index, JSVal *v
The cx argument is the opaque JSContext pointer that passes to the JavaScript function.
The obj argument is a pointer to an array object.
The index argument is an integer index into the array. The first element is index0, and the last element is index
(
length - 1).
The v argument is a pointer to a jsval where the contents of the JSVal structure in the array should be copied.
Returns
A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
JSBool JS_SetElement()
Description
This function writes a single element of an array object.
Arguments
JSContext *cx, JSObject *obj, unsigned int index, JSVal *v
The cx argument is the opaque JSContext pointer that passes to the JavaScript function.
The obj argument is a pointer to an array object.
The index argument is an integer index into the array. The first element is index0, and the last element is index
(
length - 1).
The v argument is a pointer to a JSVal structure whose contents should be copied to the JSVal in the array.
Przeglądanie stron 361
1 2 ... 357 358 359 360 361 362 363 364 365 366 367 ... 386 387

Komentarze do niniejszej Instrukcji

Brak uwag