On 9/28/2009 5:21 PM, Henry Minsky wrote:
> Yeah this has always been a not-officially supported but useful feature, 
> that you could say "foo = something" and create a global, or at least 
> something that acts like a global in the expressions
> you write in the debugger.
> 
> It would be great if we could figure out a way to make this work in 
> swf10. I wonder if we could go so far as to try to recognize statements 
> of the form "somevar = someexpression" and put code that wraps around to
> check if "somevar" is not yet defined, and if so, to define it in the 
> Debug.environment.

This will require (much?) more work, just consider how simple the 
eval-script is currently constructed, you can evaluate:
   lzx> );Debug.write("fail"

And you still get a result...



> 
> 
> On Mon, Sep 28, 2009 at 9:54 AM, André Bargull <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Forget to mention:
>     There is now a funny effect in swf9/swf10 because of the with-block.
>     You can evaluate the expression 'lzx> foo = 42' even if 'foo' is not
>     a defined variable, but if you later want to retrieve the value of
>     'foo' by evaluating 'lzx> foo', the runtime reports a
>     ReferenceError. Without the with-block, you'd get a static compiler
>     error because 'foo' is not defined. But as the with-block forces
>     dynamic look-up, the runtime needs perform this check, but
>     apparently fails for assignment expressions, only dereferencing
>     gives the ReferenceError. I'd consider this as a bug...
> 
> 
> -- 
> Henry Minsky
> Software Architect
> [email protected] <mailto:[email protected]>
> 
> 
_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to