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>