我正在尝试使用for i in newds1:
for j in newds2:
if i == j:
tmp = 1
print(i, j) #this will tell you why 1 is returned
return tmp # <<<< return from function
else:
tmp = 0
return tmp
这是代码
Titanium.Network.HTTPClient
但该应用程序崩溃时出现错误 var url = "http://www.appcelerator.com"; //Here i have my get api URL, i have also tried replacing the url with google.com
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload : function(e) {
Ti.API.info("Received text: " + this.responseText);
alert('success');
},
// function called when an error occurs, including a timeout
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
// Prepare the connection.
client.open("GET", url);
// Send the request.
client.send();
,我没有使用任何模型,这是一个带有上述代码的新项目,仅此而已。
以下是错误的屏幕截图
请帮忙!
修改 配置详细信息:
Titanium命令行界面,CLI版本5.0.13
Titanium SDK 版本6.0.4.GA
节点版本v4.8.2
如果需要进一步的详细信息,请告诉我,