[Laszlo-dev] bug with optional/rest args in compiler
Henry Minsky
henry.minsky at gmail.com
Sat Mar 29 18:13:16 PDT 2008
I tracked down a bug I was seeing to this change, if I make the args in
lps/components/base/basebutton.lzx on the "showUp()" method into "...rest"
or "sd=null", then
I get an error at runtime
ERROR @base/basebutton.lzx#212: reference to undefined variable '_enabled'
But if I change the reference from "_enabled" to "this._enabled", then it
works:
<method name="showUp" args="...rest"> <![CDATA[
if (!this._enabled && this.disabledResourceNumber) {
^^^^^^^^^^^
this.setResourceNumber( this.disabledResourceNumber );
} else {
this.setResourceNumber( this.normalResourceNumber );
}
]]>
So what is it about the optional-args transformation that would be making
the implicit "this" fail in swf8/dhtml?
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080329/f9307f55/attachment.html
More information about the Laszlo-dev
mailing list