我目前正在阅读《Beginning PhoneGap》一书中的教程。我刚刚完成了煎茶触摸教程。我试图按照http://www.sencha.com/learn/upgrading-to-sencha-touch-2-pr2将本教程中的煎茶从煎茶 1 迁移到 2,但我什么也没得到。下面是我尝试迁移的第一个面板,但我得到的只是一个白屏,任何帮助将不胜感激。
Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function(){
var lastPanelId = 0;
var SEARCHPAGE=0;
var TABPAGE=1;
var FAVPAGE=2;
var DETAILSPAGE=3;
var cachedDetails=null;
Ext.define(' var searchPanel', {
extend: 'Ext.form.FormPanel',
config: {
layout: 'fit',
fullscreen: true,
scroll: 'vertical',
standardSubmit: false,
},
items: [{
xtype: 'fieldset',
title: 'Local Search',
items: [{
xtype: 'textfield',
name: 'search',
label: 'Search',
value: 'Pizza',
useClearIcon: true,
autoCapitalize: false
}, {
xtype: 'sliderfield',
name: 'range',
label: 'Range (0-10 Kms)',
value: 5,
minValue: 0,
maxValue: 10
}]
}] //Docking a toolbar at bottom
,
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
items: [{
xtype: 'spacer'
}, {
text: 'Search',
iconCls: 'search',
title: 'Search',
iconMask: true,
ui: 'round',
ui: 'confirm',
handler: function(){
lastPanelId=TABPAGE;
fetchFromGoogle();
mainPanel.dockedItems.items[0].setTitle('Search Results');
mainPanel.setActiveItem(lastPanelId);
}
}]
}]
});