[Laszlo-dev] something in LzFormatter.formatToString is causing the flex compiler to emit bad code
Henry Minsky
henry.minsky at gmail.com
Thu Mar 6 13:22:54 PST 2008
When I comment out this code block, I don't get the verifier error
switch (directive) {
case 'U': case 'O': case 'X':
case 'u': case 'o': case 'x':
if (value < 0) {
value = (- value);
// NOTE: [2006-11-17 ptw] Number('') -> NaN in swf, 0 in
// ECMA, hence use parseInt
var wid = Math.abs(parseInt(length));
if (isNaN(wid)) {
wid = Number(value).toString(radix).length;
}
var max = Math.pow(radix, wid);
value = max - value;
}
}
mysterious...
On Thu, Mar 6, 2008 at 3:55 PM, Henry Minsky <henry.minsky at gmail.com> wrote:
> I'm trying to compile the LzFormatter mixin with LzText in swf9, and am
> encountering some runtime error,
> the flash runtime gives a verifier error of some sort. I'm trying to carve
> down the formatToString method
> to locate which statement is causing trouble. It doesn't seem to be the
> inner function, which I suspected
> because we saw an earlier problem with non-global functions which were
> assigned names. But our
> compiler isn't giving the local function a function name, and moving it
> out to be a class method doesn't make
> any difference. So I'm just doing a binary search on the method body to
> figure out what the offending code is....
>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080306/3438f962/attachment.html
More information about the Laszlo-dev
mailing list