Subj : Re: Rhino 1.5R4_1 problem with try/catch, WITH, GETBASE To : Brendan Eich From : Laura Werner Date : Mon Jun 09 2003 03:35 pm Thanks for the response, Brendan! > Why don't all scopes other than the global one you describe below > descend via parent from the global scope? They do; I must not have described it correctly. For example, it might look like this Global Scope ^ | parent | Application Scope ^ | parent | Document Scope ^ | parent | Form Scope etc. > Why does each script need its own scope object to execute? Is that part > of the VXML DOM spec? I explained this poorly too, I guess. When I execute the script, I pass in the currently active VXML scope. For example, when a form-level script is activated during form initialization, I pass in the "Form Scope" from the diagram above. Its parent chain leads up to the global scope. The problem happens if one of the functions in the script has a "with" or "try/catch". In that case, the "calleeScope" variable in Interpreter.interpret() gets set to the result of getTopLevelScope() (which is "Global Scope"), and references to other items defined in the script don't work (or other items in Form Scope if that's where the script is). I hope this is more clear. -- Laura .