grn2012
25 Nov 2011, 8:13 AM
I have everything properly set up to handle events for my main menu. For some reason, inside the init function of my controller, mouseover only works for menus, not their items. I've tried everything and I just can't seem to get it working. Are they supposed to have this event? Here is my controller code:
Ext.define('Agile.controller.Main', {
extend: 'Ext.app.Controller',
views: ['ui.Container'],
init: function() {
this.control( {
'menu > menuitem': {
click: this.onClick,
},
'syntax': {
mouseover: this.onMouseOver
}
} );
},
onClick: function(objBtn, objMenu, objOptions) {
console.log('click fired')
strID = objBtn.id;
switch (objBtn.id) {
case "syntax":
// Need the mouseover event to fire here to eliminate redundancy. Syntax
// is a child menu, just toe explain.
console.log('syntax wee');
break;
}
},
onMouseOver: function(objBtn) {
console.log('mouseover fired')
console.log(objBtn)
refreshViewSettings();
}
} );
Ext.define('Agile.controller.Main', {
extend: 'Ext.app.Controller',
views: ['ui.Container'],
init: function() {
this.control( {
'menu > menuitem': {
click: this.onClick,
},
'syntax': {
mouseover: this.onMouseOver
}
} );
},
onClick: function(objBtn, objMenu, objOptions) {
console.log('click fired')
strID = objBtn.id;
switch (objBtn.id) {
case "syntax":
// Need the mouseover event to fire here to eliminate redundancy. Syntax
// is a child menu, just toe explain.
console.log('syntax wee');
break;
}
},
onMouseOver: function(objBtn) {
console.log('mouseover fired')
console.log(objBtn)
refreshViewSettings();
}
} );