Advertisement
Guest User

CUGIO_easy

a guest
Sep 30th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function createCoordinates(){
  2.  
  3.                
  4.  for(var i=0;i<args.length;i++){  
  5.    
  6.     ....
  7.     ....
  8.     var addrReq = Titanium.Network.createHTTPClient();
  9.     addrReq.open("GET",addrUrl);
  10.     addrReq.send(null);
  11.     addrReq.onload =( function(index){
  12.        
  13.         Ti.API.info("viene stampato appena entro nella funzione onload");
  14.        
  15.            
  16.         return function (resp){
  17.        
  18.             Ti.API.info("viene stampato appena entro nella function"); 
  19.         };
  20.     Ti.API.info("non verrà mai stampato")
  21.     })(i);
  22.    
  23.     Ti.API.info("viene stampato prima che venga eseguita onload");
  24.  };
  25.  sleep(10000);
  26. Ti.API.info("dopo aver dormito per la sleep stampa poi esegue la onload");
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement