Skip to content
Snippets Groups Projects
Commit 4fb85335 authored by rswindell's avatar rswindell
Browse files

Added descriptions for associative arrays, made them enumerable again.

parent 0a0a4fb9
No related branches found
No related tags found
No related merge requests found
......@@ -294,7 +294,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
/* Add as property (associative array element) */
if(!JS_DefineProperty(cx, alldirs, cfg->dir[d]->code, val
,NULL,NULL,JSPROP_READONLY))
,NULL,NULL,JSPROP_READONLY|JSPROP_ENUMERATE))
return(NULL);
#ifdef _DEBUG
......@@ -315,6 +315,11 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, areaobj, "dir", &val))
return(NULL);
#ifdef _DEBUG
js_DescribeObject(cx,alldirs,"Associative array of all directories (use internal code as index)");
JS_DefineProperty(cx,alldirs,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
return(areaobj);
}
......
......@@ -317,10 +317,9 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
/* Add as property (associative array element) */
if(!JS_DefineProperty(cx, allsubs, cfg->sub[d]->code, val
,NULL,NULL,JSPROP_READONLY))
,NULL,NULL,JSPROP_READONLY|JSPROP_ENUMERATE))
return(NULL);
#ifdef _DEBUG
js_DescribeObject(cx,subobj,"Message Sub-boards");
#endif
......@@ -339,6 +338,11 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
if(!JS_SetProperty(cx, areaobj, "sub", &val))
return(NULL);
#ifdef _DEBUG
js_DescribeObject(cx,allsubs,"Associative array of all sub-boards (use internal code as index)");
JS_DefineProperty(cx,allsubs,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
return(areaobj);
}
......
......@@ -245,7 +245,7 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
/* Add as property (associative array element) */
if(!JS_DefineProperty(cx, allprog, cfg->xtrn[d]->code, val
,NULL,NULL,JSPROP_READONLY))
,NULL,NULL,JSPROP_READONLY|JSPROP_ENUMERATE))
return(NULL);
#ifdef _DEBUG
......@@ -266,6 +266,11 @@ JSObject* DLLCALL js_CreateXtrnAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, areaobj, "prog", &val))
return(NULL);
#ifdef _DEBUG
js_DescribeObject(cx,allprog,"Associative array of all external programs (use internal code as index)");
JS_DefineProperty(cx,allprog,"_dont_document",JSVAL_TRUE,NULL,NULL,JSPROP_READONLY);
#endif
/* Create event property */
if((eventobj=JS_NewObject(cx,NULL,NULL,areaobj))==NULL)
return(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment