我正在創建一個應用程序,在其中創建像sencha touch theming expample這樣的彈出窗口來選擇導航項目。sencha touch如何通過sencha touch觸摸主題示例進行導航
我想看到github的暗示它的代碼,但不知道是什麼我失蹤兔子是我的標題欄和列表按鈕的代碼。
Ext.define('ov_app.view.HeaderBar', {
xtype : 'HeaderBar',
extend:'Ext.Toolbar',
config: {
// xtype : 'toolbar',
ui: 'plain',
docked: 'top',
cls: 'menuBar',
border:0,
defaults:{
border: 0,
},
items: [
{
iconCls: 'list',
iconMask: true,
ui: 'plain',
action: 'ShowMoreOption',
},{
xtype: 'spacer'
},{
xtype: 'container',
html: '<img src="resources/images/logo.png">'
},{
xtype: 'spacer'
},{
iconCls: 'home',
iconMask: true,
id: 'homeBtn',
ui: 'plain',
action: 'push-view'
}
]
}
});
`
和代碼爲我的控制器main.js到亨德爾的列表按鈕的標籤動作。
Ext.define('ov_app.controller.MainController', {
extend: 'Ext.app.Controller',
config:{
control: {
'button[action=push-view]': {
tap: 'pushViewFunction'
},
'button[action=ShowMoreOption]':{
tap: 'togglMenu'
},
},
},
pushViewFunction: function() {
ov_app.container.setActiveItem(0);
},
togglMenu: function(){
console.log("hello");
}
togglMenu: function(button) {
this.getStyleBubble().showBy(button)
},
});
`
當我嘗試點擊列表按鈕頂部的錯誤我在控制檯中看到的是這樣的
Uncaught TypeError: Object [object Object] has no method 'getStyleBubble'
而且我沒有看到任何定義這個'getStyleBubble'函數在模型,視圖,控制器,商店目錄中的任何文件中。所以它在任何觸摸目錄文件中定義,或者我缺少一些東西。
https://github.com/senchalearn/Touch-Theming/blob/master/app/controller/Main.js,並在控制器的裁判尋找styleBubble配置對象 – 2013-05-03 09:21:53
這是如何控制器的引用工作http://docs.sencha.com/touch/2.1.1/#!/api/Ext.app.Controller-cfg-refs – 2013-05-03 09:22:27