Forum Discussion
DeanOusterhout
9 years agoQrew Assistant Captain
Hello Dan,
It is now working. In fiddling around with it, I made this...
var ContinueNextTaskNow = $("continue_next_task_now", xml1a).text();
var testContinueNextTaskNow = ContinueNextTaskNow;
into this:
var ContinueNextTaskNow = $("continue_next_task_now", xml1a).text();
var testContinueNextTaskNow = $("continue_next_task_now", xml1a).text();
Now, the first variable... ContinueNextTaskNow is holding it's value, but the last variable (testContinueNextTaskNow ) is not.
Any thoughts as to why that might be happening?
Thanks for your effort on this...
Dean
It is now working. In fiddling around with it, I made this...
var ContinueNextTaskNow = $("continue_next_task_now", xml1a).text();
var testContinueNextTaskNow = ContinueNextTaskNow;
into this:
var ContinueNextTaskNow = $("continue_next_task_now", xml1a).text();
var testContinueNextTaskNow = $("continue_next_task_now", xml1a).text();
Now, the first variable... ContinueNextTaskNow is holding it's value, but the last variable (testContinueNextTaskNow ) is not.
Any thoughts as to why that might be happening?
Thanks for your effort on this...
Dean
_anomDiebolt_
9 years agoQrew Elite
It is undoubtedly a scope problem because of the way your code is constructed and its length.
I noticed you have all of these comments in the code reminding you of where a block ends:
I noticed you have all of these comments in the code reminding you of where a block ends:
} // end of if found next task...This is a code smell that you are indenting too much to hold the function of the code in your mind all at one time. You might get it working by wrapping things in try catch blocks, creating more global variables and throwing a ton of debug commands around but this approach is unsustainable. You should retrench and adopt the idioms I have mentioned. I will comment further when I get some more time.