Unsigned Short *Js_Valuetostring(); Jsbool Js_Valuetointeger() - MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual

Flash javascript dictionary
Hide thumbs Also See for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY:
Table of Contents

Advertisement

unsigned short *JS_ValueToString()

Usage
unsigned short *JS_ValueToString(JSContext *cx, jsval v,
unsigned int *pLength)
Description
Method; extracts a function argument from a
and passes the converted value back to the caller.
Note: Do not modify the returned buffer pointer or you might corrupt the data structures of the
JavaScript interpreter. To change the string, you must copy the characters into another buffer and
create a new JavaScript string.
Arguments
JSContext *cx
The
argument is the opaque
cx
The
argument is the
v
The
pLength
to the length of the string in bytes.
Returns
A pointer that points to a null-terminated string if successful or to a
calling routine must not free this string when it finishes.

JSBool JS_ValueToInteger()

Usage
JSBool JS_ValueToInteger(JSContext *cx, jsval v, long *lp);
Description
Method; extracts a function argument from a
possible), and passes the converted value back to the caller.
Arguments
JSContext *cx
The
argument is the opaque
cx
The
argument is the
v
The
argument is a pointer to a 4-byte integer. This function stores the converted value
lp
in
.
*lp
Returns
A Boolean value:
378
Chapter 4: C-Level Extensibility
,
,
jsval v
unsigned int *pLength
JSContext
structure from which the string is to be extracted.
jsval
argument is a pointer to an unsigned integer. This function sets
,
,
jsval v
long *lp
JSContext
structure from which the integer is to be extracted.
jsval
indicates success;
JS_TRUE
structure, converts it to a string, if possible,
jsval
pointer that passes to the JavaScript function.
structure, converts it to an integer (if
jsval
pointer that passes to the JavaScript function.
indicates failure.
JS_FALSE
*plength
value on failure. The
null
equal

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents