Here's a short snippet of my code:
if (JS_FALSE == JS_GetArrayLength(cx, obj, &a_len)) {
EDJS_ERR(cx, EDJSERR_ARRAY_LEN);
goto error;
}
printf("array: %s\n", JS_GetStringBytes(JS_ValueToString(cx,
OBJECT_TO_JSVAL(obj))));
//prints: "array: a,b,c"
for (i = 0; i < a_len; i++) {
if (JS_FALSE == JS_LookupElement(cx, obj, i, &a_val)) {
goto error;
}
if (JS_TRUE == JSVAL_IS_BOOLEAN(a_val))
printf("value %d is boolean\n", i);
//prints boolean 3 times
//...
}
Am I crazy?
Igor
2009/3/31 dave <man...@gmail.com>:
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
No, thank you!
Igor
2009/3/31 dave <man...@gmail.com>:
Thanks for the tip. I will implement the change.