MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spécifications Page 464

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 504
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 463
464 C-Level Extensibility
The bp argument is a pointer to a JSBool Boolean value. This function stores the
converted value in
*bp.
Returns
A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
JSBool JS_ValueToObject()
Description
This function extracts a function argument from a jsval structure, converts it to an object (if
possible), and passes the converted value back to the caller. If the object is an array, use
JS_GetArrayLength() and JS_GetElement() to read its contents.
Arguments
JSContext *cx, jsval v, JSObject **op
The cx argument is the opaque JSContext pointer that passes to the JavaScript function.
The v argument is the jsval structure from which the object is to be extracted.
The op argument is a pointer to a JSObject pointer. This function stores the converted
value in
*op.
Returns
A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
JSBool JS_StringToValue()
Description
This function stores a string return value in a jsval structure. It allocates a new JavaScript
string object.
Arguments
JSContext *cx, char *bytes, size_t sz, jsval *vp
The cx argument is the opaque JSContext pointer that passes to the JavaScript function.
The bytes argument is the string to be stored in the jsval structure. The string data is
copied, so the caller should free the string when it is not needed. If the string size is not
specified (see the
sz argument), the string must be null-terminated.
The sz argument is the size of the string, in bytes. If sz is 0, the length of the
null-terminated string is computed automatically.
Vue de la page 463
1 2 ... 459 460 461 462 463 464 465 466 467 468 469 ... 503 504

Commentaires sur ces manuels

Pas de commentaire