On Wed, Sep 10, 2008 at 5:52 PM, John de la Garza <[EMAIL PROTECTED]> wrote:
> The following codes logs prints out NaN, but if I remove a non related
> line of logging code then it prints out a number. this behavior only
> shows it self in build mode, in source mode everything works...
>
> Anyone have any idea as to why taking out
> console.log("html1:"+html1); would make the line above it
> console.log('calc: '+v); print a number? but leaving it in makes it say
> NaN?
>
> also, any idea why it works as source but not as a build?
I can not reproduce this problem (it never prints NaN in either case for me)
but I highly suspect that the problem has to do with the fact that your
variable 'v' is global. You don't have a "var v" anyplace in your
application. See if changing this:
for (v=1, cam=1;v<=row;v++)
to this:
for (var v=1, cam=1;v<=row;v++)
improves things any.
(BTW, this also fixes global variable 'cam' but not global variable 'i' uses
above.)
This could change between source and build versions because the build
replaces variable names. I would not expect global variables to be
replaced, but that's at least a possible reason for your source/build
differences.
Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel