Hi guys,
I've come across a bug in the generator (I'm using 0.8.2) where if you have
an uppercase variable name that is already one character and which would
conflict with one of the variables which is output by the generator then the
variable is not renamed and my code will overwrite it.
At least, that's what I think is happening! In the debugger, I can see the
variables R and T match what they were declared as in the initial closure
but S is undefined. In my code, the variable S wasn't actually used (eg a
copy-and-paste error or something) and as soon as I deleted the line "var
S=null;" everything works as expected; the only odd thing is that the values
of R, S, and T changed so that T had what previously should have been S, S
was what previously was R, and so on.
The generator produces this (reformatted):
(
function(){
var B="",
A="execute",
z="#",
y=" - ",
x="changeValue",
w="kJ / ",
v=": ",
u="icon",
t="Boolean",
r="qx.event.type.DataEvent",
bb="\n\n",
ba="_applyEditable",
Y="(0% GDA)",
X="both",
W="Object",
V="kCal; ",
U="kCal\n",
T="save",
S="Energy per 100",
R="_applyValue",
I="sodium",
J="mg",
G="autoforms/icon/16/notepad.png",
H="(",
E="Wizard",
F="spar.qa.Nutrition",
C=' ',
D="autoforms/icon/16/list-remove.png",
K="% GDA)",
L="\n",
N="100",
M="autoforms/icon/16/list-add.png",
P="monospace",
O="Srv",
Q="per ";
qx.Class.define(F,{
[...snip...]
members:{describe:function(bl){
bq+=S+bl.unit+v+bm.kJ+w+bm.kCal+V;
bm=this.__fz(bl,O);
bq+=Q+bl.servingSize+bl.unit+v+bm.kJ+w+bm.kCal+U;
for(var i=0;i<bl.substances.length;i++){var s=bl.substances[i];
var S=null;
var bp=s.code==I?2:0;
bq+=this.__fA(s.name,30)+this.__fA(parseFloat(s.quantity100).toFixed(bp)+s.u
nit,10)+this.__fA(parseFloat(s.quantitySrv).toFixed(bp)+s.unit,10);
John
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel