Note that there are some explanatory texts on larger screens.

plurals
  1. POAS3Eval library is complaining about "Variable compile is not defined"
    primarykey
    data
    text
    <p>I'm working with <strong>FlashBuilder 4.6</strong> and using <strong>AS3Eval v0.3 library</strong> from: <a href="http://eval.hurlant.com/" rel="nofollow">http://eval.hurlant.com/</a></p> <p>The library is <strong>fully working</strong> in <strong>one</strong> of my <strong>Flex 4.6.0 projects</strong> but <strong>not in the other</strong> (same library linkage "Merge into code" of EvalES4.swc library).</p> <p>In the <strong>first project</strong> following code works:</p> <pre><code>private var compiler:CompiledESC = new CompiledESC; public function compile(code: String) : ByteArray { return compiler.eval(code); } </code></pre> <p>In the <strong>other project</strong>, it <strong>fails</strong> with: <strong>ReferenceError: Error #1065: Variable compile is not defined.</strong></p> <p>The error is referring to following line in the AS3Eval library (that EvalES4.swc file)</p> <pre><code>var compile:Function = getDefinitionByName("ESC::compile") as Function; </code></pre> <p>Looks like the library has problem to fully load Tamarin ESC in the other project.</p> <p>I've checked that both projects (they are using the same library... but still checked) load the Tamarin ESC successfully via</p> <pre><code> // inside CompiledESC.as private function loadESC():void { var a:Array = [ new debug_abc as ByteArray, new util_abc as ByteArray, new bytes_tamarin_abc as ByteArray, new util_tamarin_abc as ByteArray, new lex_char_abc as ByteArray, new lex_scan_abc as ByteArray, new lex_token_abc as ByteArray, new ast_abc as ByteArray, new parse_abc as ByteArray, new asm_abc as ByteArray, new abc_abc as ByteArray, new emit_abc as ByteArray, new cogen_abc as ByteArray, new cogen_stmt_abc as ByteArray, new cogen_expr_abc as ByteArray, new esc_core_abc as ByteArray, new eval_support_abc as ByteArray, new esc_env_abc as ByteArray, ] ByteLoader.loadBytes(a, true); } </code></pre> <p>These ByteArray classes are embedded inside the SWC using [Embed] (looking through the library code) and all ByteArrays are in both cases initialized and loaded via ByteLoader.</p> <p>So far, I have not found any clue why compiling is working for my first project but not for the other. Does anybody has similar experiences or some hints what may cause the problem?</p> <p>Best, Jakub</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload