On 2007-06-13, at 12:17 EDT, Qrowd Support wrote:

Hi,

Ah, yes.  Thanks for pointing that out.  :-)

SWF mode doesn't give any error and masks the problem entirely.

SWF is very forgiving of errors and fails silently, unless debugging is turned on.

Would be helpful if the compiler could warn, if feasible.

Good improvement suggestion. Not trivial to do as the compiler would have to do much more analysis to realize that your expression is clobbering a method. Fixed in Javascript 2. :)

Robert Yeager
Founder, Qrowd
http://www.qrowd.com/blog
http://www.qrowd.com <http://www.qrowd.com>


P T Withington wrote:
Hi Robert,

Javascript is essentially a 'Lisp 1'. Functions and Variables are in the same namespace. In your handler you are overwriting your onx method with the onx delegate. If you give your method a different name, you will not see this error:

       <handler name="oninit">
this.onx_del = new LzDelegate(this, "onx_meth", this, "onx");
       </handler>
       <method name="onx_meth">
           Debug.write("onx_meth: "+this.x);
       </method>

[We could probably have a better error message in this case to help you find the error.]

On 2007-06-12, at 19:17 EDT, Qrowd Support wrote:

Nightly build 5388 crashes the DHTML runtime with this code:

<canvas id="maincanvas" width="100%" height="100%" validate="false" debug="true" proxied="false" bgcolor="0x00aaaa">
   <debug x="650" y="200" width="800" height="400" fontsize="12"/>

   <window x="100" y="100" width="200" height="200">
       <handler name="oninit">
this.onx_del = new LzDelegate(this, "onx_del", this, "onx");
       </handler>
       <method name="onx_del">
           Debug.write("onx_del: "+this.x);
       </method>
   </window>
</canvas>

DHTML IE7 and FF both crash with debug and non-debug runtimes.

FF debug DHTML gives this runtime error:

ERROR: http://localhost:8080/lps/includes/lfc/LFCdhtml-debug.js: 4041: $5_d.c[$5_d.f] is not a function <javascript:window.parent. $modules.lz.Debug.displayObj(5)>

The test code is borderline nonsensical...SWF doesn't display the debug output...but the DHTML should fail gracefully.
--
Robert Yeager
Founder, Qrowd
http://www.qrowd.com/blog
http://www.qrowd.com <http://www.qrowd.com>



Reply via email to