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?
qx.Class.define("tool_bar_demo.Application",
{
extend : qx.application.Standalone,
members :
{
main: function()
{
this.base(arguments);
var horiz =700
var vert = 700;
var col = 2;
var row = 2;
var mainContainer = new qx.ui.container.Composite(new
qx.ui.layout.Basic());
var foz=this.getRoot();
var html1="";
for (i=0;i<horiz;i+=horiz/col)
{
html1 +='<div style="position:absolute; top: 0; left:
'+i+'px; width: 2px; height: '
+vert+'px; background: black;" ></div>\n';
}
for (i=0;i<vert;i+=vert/row)
{
html1+='<div style=" position:absolute; top: '+i+'px;
left: 0px; width: '
+horiz+'px; height: 2px; background: black;" ></div>\n';
}
html1 +='<div style="position:absolute; top: 0; left:
'+horiz+'px; width: 2px; height: '
+vert+'px; background: black;" ></div>\n';
html1 +='<div style="position:absolute; top: '+vert+'px; left:
0px; height: 2px; width: '
+vert+'px; background: black;" ></div>\n';
for (v=1, cam=1;v<=row;v++)
{
for (h=1;h<=col;h++, cam++)
{
html1 +='<div style="position:absolute; top:
'+Math.floor((v*(vert/row)-((vert/row)*.10)))
+'px; left: '
+Math.floor((h*(horiz/col)-((horiz/col)*.60)))
+'px;color: black; " >camera '+cam+'</div>\n';
console.log('calc: '+Math.floor((v*(vert/row)-((vert/row)*.10))));
console.log('calc: '+v);
}
}
console.log("html1:"+html1);
var embed1 = new qx.ui.embed.Html(html1);
embed1.setWidth(horiz+2);
embed1.setHeight(vert+2);
mainContainer.add(embed1);
// add the main container to the root
this.getRoot().add(mainContainer);//, {left:20, top:20, right:20});
this.getRoot().setBackgroundColor(null);
}
}
});
-------------------------------------------------------------------------
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