neurodon
3 Jul 2012, 10:29 AM
I am moving the "field editor" example code over from just the view and putting it in to a controller.
Capturing 'dblclick' in a form works when you use the ".on()" method, but not when you use ComponentQuery.
For example: This works in the 'app.controls.fieldeditor' view...
initComponent: function(config) {
var me = this;
this.on({dblclick: { fn: this.startEdit, scope:this, element:'body'}});
me.callParent(arguments);
}
However this does not work in the controller:
init: function() {
this.control({
'[xtype="app.controls.fieldeditor"]': {
dblclick: {
fn: this.startEdit, scope:this, element:'body'
}
}
});
},
What am I doing wrong?
Capturing 'dblclick' in a form works when you use the ".on()" method, but not when you use ComponentQuery.
For example: This works in the 'app.controls.fieldeditor' view...
initComponent: function(config) {
var me = this;
this.on({dblclick: { fn: this.startEdit, scope:this, element:'body'}});
me.callParent(arguments);
}
However this does not work in the controller:
init: function() {
this.control({
'[xtype="app.controls.fieldeditor"]': {
dblclick: {
fn: this.startEdit, scope:this, element:'body'
}
}
});
},
What am I doing wrong?