ナビゲーション項目を選択するために、sencha touch theming exampleのようなポップアップを作成する必要があるアプリを作成しています。
ヒントを得るために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'
}
]
}
});
`
リストボタンのタブアクションをHandelするためのコントローラー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)
},
});
`
上部のリストボタンをクリックしようとすると、コンソールに表示されるエラーはこれです
キャッチされていない TypeError: オブジェクト [オブジェクト オブジェクト] にメソッド 'getStyleBubble' がありません
また、モデル、ビュー、コントローラー、ストアディレクトリのどのファイルにも、この「getStyleBubble」関数の定義がありませんでした。タッチディレクトリファイルで定義されているか、何か不足しています。