Adobe Extending Flash Professional CS4 Uživatelský manuál Strana 556

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 560
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 555
534
EXTENDING FLASH CS4 PROFESSIONAL
C-Level Extensibility
Returns
A JSVal structure that contains the integer that passed to the function as an argument.
JSVal JS_ObjectToValue()
Usage
jsval JS_ObjectToValue(JSObject *obj);
Description
Method; stores an object return value in a JSVal. Use JS_NewArrayObject() to create an array object; use
JS_SetElement() to define its contents.
Arguments
JSObject *obj
The obj argument is a pointer to the JSObject object that you want to convert to a JSVal structure.
Returns
A JSVal structure that contains the object that you passed to the function as an argument.
unsigned short *JS_ObjectType()
Usage
unsigned short *JS_ObjectType(JSObject *obj);
Description
Method; given an object reference, returns the class name of the object. For example, if the object is a DOM object, the
function returns "
Document". If the object is a node in the document, the function returns "Element". For an array
object, the function returns "
Array".
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 JS_ValueToObject() function.
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 JSVals.
Zobrazit stránku 555
1 2 ... 551 552 553 554 555 556 557 558 559 560

Komentáře k této Příručce

Žádné komentáře