If you type this to the debug evaluator

(function (x) { return x.foo })(3)

It compiles down to this code, which is then linked to the debug LFC, and I
do not understand why it complains about
"Error" being unknown. "lz" and "$lzsc$runtime" are declared globals in the
LFC, so I don't see why it
complains about them either.


package {

    import flash.display.*;
    import flash.events.*;
    import flash.utils.*;
    import flash.text.*;
    import flash.system.*;
    import flash.net.*;
    import flash.ui.*;
    import flash.external.*;
    public class DebugEvaluate extends DebugExec {
        override public function runToplevelDefinitions () {;
            (function () {
                try {
                    try {
                        with (Debug.environment) {
                            Debug.displayResult((function (x_$1) {
                                        try {
                                            return x_$1.foo
                                                }
                                        catch ($lzsc$e) {
                                            if ($lzsc$e is Error && $lzsc$e
!== lz["$lzsc$thrownError"]) {

$lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 11,
$lzsc$e)
                                                    } else {
                                                throw $lzsc$e
                                                    }}}
                                    )(3))
                                }}
                    catch (e_$1) {
                        Debug.displayResult(e_$1)
                            }}
                catch ($lzsc$e) {
                    if ($lzsc$e is Error && $lzsc$e !==
lz["$lzsc$thrownError"]) {

$lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 8,
$lzsc$e)
                            } else {
                        throw $lzsc$e
                            }}}
                )();
        }
    }
}


Which gets these flex compiler errors

Loading configuration file
/Users/hqm/openlaszlo/trunk6/WEB-INF/frameworks/flex-config.xml
/Users/hqm/openlaszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/Users/hqm/openlaszlo/trunk6/test/build/foo.lzx/DebugEvaluate.as(22):
col: 16 Error: Access of undefined property Error.

if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {
               ^

/Users/hqm/openlaszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/Users/hqm/openlaszlo/trunk6/test/build/foo.lzx/DebugEvaluate.as(22):
col: 37 Error: Access of undefined property lz.

if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {
                                    ^

/Users/hqm/openlaszlo/lib/jakarta-tomcat-5.0.30/temp/lzswf9/Users/hqm/openlaszlo/trunk6/test/build/foo.lzx/DebugEvaluate.as(23):
col: 1 Error: Access of undefined property $lzsc$runtime.

$lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 11,
$lzsc$e)
^


-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to