If you type this to the debug evaluator<br><br>(function (x) { return x.foo })(3)<br><br>It compiles down to this code, which is then linked to the debug LFC, and I do not understand why it complains about<br>"Error" being unknown. "lz" and "$lzsc$runtime" are declared globals in the LFC, so I don't see why it<br>
complains about them either. <br><br><br>package {<br> <br> import flash.display.*;<br> import flash.events.*;<br> import flash.utils.*;<br> import flash.text.*;<br> import flash.system.*;<br> import flash.net.*;<br>
import flash.ui.*;<br> import flash.external.*;<br> public class DebugEvaluate extends DebugExec {<br> override public function runToplevelDefinitions () {;<br> (function () {<br> try {<br>
try {<br> with (Debug.environment) {<br> Debug.displayResult((function (x_$1) {<br> try {<br> return x_$1.foo<br>
}<br> catch ($lzsc$e) {<br> if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {<br>
$lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 11, $lzsc$e)<br> } else {<br> throw $lzsc$e<br>
}}}<br> )(3))<br> }}<br> catch (e_$1) {<br> Debug.displayResult(e_$1)<br>
}}<br> catch ($lzsc$e) {<br> if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {<br> $lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 8, $lzsc$e)<br>
} else {<br> throw $lzsc$e<br> }}}<br> )();<br> }<br> }<br>}<br><br clear="all"><br>Which gets these flex compiler errors<br>
<br>Loading configuration file /Users/hqm/openlaszlo/trunk6/WEB-INF/frameworks/flex-config.xml<br>/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.<br>
<br>if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {<br> ^<br><br>/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.<br>
<br>if ($lzsc$e is Error && $lzsc$e !== lz["$lzsc$thrownError"]) {<br> ^<br><br>/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.<br>
<br>$lzsc$runtime.$reportException("[CommonGenerator.parseFragment]", 11, $lzsc$e)<br>^<br><br><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br>
<br><br>