Subj : Re: Help with scoping within the JSAPI To : alipman2@yahoo.com From : Brendan Eich Date : Sat May 28 2005 12:38 am alipman2@yahoo.com wrote: > I am writing an application where I need 3 levels of scoping. > > 1. Application Scope > 2. Global Scope > 3. Local Scope > > Currently, I have 2 levels of scoping working > I use the Global Object for scope 1, and then I push a stack frame with > my own varobj for scope 2. Please stop using non-public-API header files. There is absolutely no reason to do so, and you're not using the private header files well in any event. Scope chain linkage is via the parent slot (__parent__ in the extended language, JS_GetParent and JS_SetParent APIs, also the fourth argument to JS_NewObject, etc.). All you need is the public jsapi.h header, and correct usage of JS_NewObject, JS_ConstructObject, JS_SetParent, etc. /be .