我在向面板解析数据时面临一个小问题,这是我的代码:
Ext.onReady(function(){
var stockings = [],i=0;
Ext.regModel('Carding', {fields: ['price'] });
var Detailsstore = new Ext.data.Store({
model: 'Carding',
proxy: {
type: 'ajax',
url: 'http://192.168.1.92/testapp/websample%20backup/sample/assets/www/XMLS/xmlformatses.xml',
reader: {
type: 'xml',
record: 'root'
}
},
listeners: {
single: true,
datachanged: function(){
Detailsstore.each(function(r){
stockings[i++]=r.get('price');
});
alert(stockings[3]);//This alert works fine
}
}
});
Detailsstore.read();
alert(stockings[3]);//this alert even being placed after the Detailsstore it shows undefined . . . . .
var showdetails = new Ext.Panel({
scroll :'vertical',
flex:7,
renderTo: 'bubbleCt',
baseCls: 'kiran',
stretchX: true,
html: '<span …Run Code Online (Sandbox Code Playgroud) 我正在研究APPCELERATOR TITANIUM.
我正在使用一个数据库,其中奇怪的是一些SQL查询不能正常工作,例如:
db.execute("SELECT Location_Diners.Dining_Time,Location_Diners.First_Name,Location_Diners.Last_Name,Location_Diners.PartySize,Location_Diners.Diner_ID,Location_Diners.DinerStatusColor_ID,Location_Diners.Notes,Location_Diners.Diner_ID,Location_SeatedDiners.Table_ID FROM Location_Diners LEFT JOIN Location_SeatedDiners ON Location_Diners.Diner_ID=Location_SeatedDiners.Diner_ID");
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误,请帮助我在这里.....
2011-12-21 11:47:29.416 abc[5254:ac03] [ERROR] A SQLite database error occurred on database '/Users/../iPhone Simulator/4.3.2/Applications/C377123C-7A2A-4FDF-9314-428713C885FD/Library/Application Support/database.sql': Error Domain=com.plausiblelabs.pldatabase Code=3 "An error occured parsing the provided SQL statement." UserInfo=0x6ad4330 {com.plausiblelabs.pldatabase.error.vendor.code=1, NSLocalizedDescription=An error occured parsing the provided SQL statement., com.plausiblelabs.pldatabase.error.query.string=SELECT Location_Diners.Dining_Time,Location_Diners.First_Name,Location_Diners.Last_Name,Location_Diners.PartySize,Location_Diners.Diner_ID,Location_Diners.DinerStatusColor_ID,Location_Diners.Notes,Location_Diners.Diner_ID,Location_SeatedDiners.Table_ID FROM Location_Diners LEFT JOIN Location_SeatedDiners ON Location_Diners.Diner_ID=Location_SeatedDiners.Diner_ID, com.plausiblelabs.pldatabase.error.vendor.string=no such table: Location_Diners} (SQLite #1: no such table: Location_Diners) (query: 'SELECT Location_Diners.Dining_Time,Location_Diners.First_Name,Location_Diners.Last_Name,Location_Diners.PartySize,Location_Diners.Diner_ID,Location_Diners.DinerStatusColor_ID,Location_Diners.Notes,Location_Diners.Diner_ID,Location_SeatedDiners.Table_ID FROM Location_Diners LEFT JOIN Location_SeatedDiners ON Location_Diners.Diner_ID=Location_SeatedDiners.Diner_ID')
[ERROR] invalid SQL …Run Code Online (Sandbox Code Playgroud) 我正在尝试在UIWebView中加载html字符串时遇到问题.这就是我正在做的事情
NSString *temp = [[NSString alloc] initWithFormat:@"<head><script type='text/javascript' src='code39.js'></script><style type='text/css'>#barcode {font-weight: normal; font-style: normal; line-height:normal; sans-serif; font-size: 12pt}</style></head><body><script type='text/javascript'>function get_object(id) {var object = null;if (document.layers) {object = document.layers[id];} else if (document.all) {object = document.all[id];}return object;}get_object('barcode').innerHTML=DrawCode39Barcode('%@',2);</script></body>",[count objectAtIndex:i]];
[mainWebView loadHTMLString:temp baseURL:nil];
Run Code Online (Sandbox Code Playgroud)
所以这是问题所在:
<script type='text/javascript' src='code39.js'>
Run Code Online (Sandbox Code Playgroud)
如何在我的应用程序中添加code39.js文件,以便我的html可以访问它并在UIWebview中加载它.
请帮忙...
我在这里遇到了一个问题UIColor.
我将从web服务中获取颜色名称
红色,蓝色,洋红色.......等等.
如何使用此设置视图的backgroundColor.
我只能找到具有这些颜色名称的类方法([UIColor redColor], [UIColor blueColor], [UIColor magentaColor])但我无法编写以编程方式调用这些方法的代码,因为我得到的颜色名称是动态的.
请帮忙.....
谢谢.
我正在尝试从一个.js文件发送三个数据数组,第一个网页使用该文件到第二个网页使用的另一个.js文件.
第一个网页中的数据是动态构建的,因此这三个数组将被发送到下一个网页.
任何人都可以建议一些JavaScript代码或教程.
请帮忙...............
感谢你们......
我在解析从hello.json到当前html文件的json数据时遇到问题.
我如何从hello.json获得投资者,事件和价格的数据到三个单独的数组.
http://compliantbox.com/mobile/optionsedge/hi.html
请帮帮我!!!
这是我的HTML代码:
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.4.js"></script>
</head>
<body>
<script>
$.getJSON("http://compliantbox.com/mobile/optionsedge/hello.json?jsoncallback=?",
{},
function(data) { alert(data); $.each(data.items, function(i,item){ alert(); });
});
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这是我的json代码:
{ "data":
{
"current_condition":[{
"investors": [{"active"},{"agressive"},{"conservative"},{"day trader"},{"very active"}],
"events": [{"3 months"},{"weekly"},{"monthly"},{"leaps"},{"heaps"}],
"price": [{"4"},{"3"},{"9"},{"5"},{"2"}]
} ] }}
Run Code Online (Sandbox Code Playgroud) html ×3
javascript ×3
ios ×2
iphone ×2
appcelerator ×1
database ×1
extjs ×1
ipad ×1
jquery ×1
json ×1
objective-c ×1
parsing ×1
sencha-touch ×1
sql ×1
titanium ×1
uicolor ×1
uiwebview ×1
xml-parsing ×1