Hi,

I have something like this:

function outer() {

        var a = new Array();
        .
        .

        function inner (something) {
                a.push(something);
        }
        .
        .
        inner (whatever);
}

...and the interpreter barfs with "'a' is undefined."

I tried this:

function outer() {

        var a = new Array();
        .
        .
        .
        function inner (foo, something) {
                foo.push (something);
        }
        .
        .
        inner (a, whatever);
}

...and that worked fine!

WTD, is this a scope chain bug in Rhino or something? AFAIK this is legit Javascript... am I wrong about that?

Thanks,
Mark


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to