- 
                Notifications
    You must be signed in to change notification settings 
- Fork 99
Open
Description
Hello,
I am having some issue with the _when function.
Here is my code :
var myGoogleSpreadsheet = ;// some google spreadsheet url
var ds = [];
var nbTab = 2;
for (j=0;j<nbTab;j++){
    ds[j]=loadDS(myGoogleSpreadsheet ,j+1);
}
var str="";
for (j=1;j<nbTab;j++){
    str += "ds["+(j-1)+"].fetch()";
    if (j<nbTab-1){str+=",";}
}
_.when(eval(str)).then(function() {
log("eval ds0:"+ds[0].columnNames()+"ds1:"+ds[1].columnNames());
});
_.when(ds[0].fetch()).then(function() {
log("not eval"+ds[0].columnNames());
});The first _when() doesn't return a result at each time.
While if I change the code too :
_.when(ds[0].fetch()).then(function() {
log("not eval"+ds[0].columnNames());
});
_.when(eval(str)).then(function() {
log("eval ds0:"+ds[0].columnNames()+"ds1:"+ds[1].columnNames());
});I always seem to have a result. Am I missing something here ?
Kind regards
guillaume
Metadata
Metadata
Assignees
Labels
No labels