Ext.Button handler config option
Posted
by
ppecher
on Stack Overflow
See other posts from Stack Overflow
or by ppecher
Published on 2011-03-03T15:00:58Z
Indexed on
2011/03/03
15:25 UTC
Read the original article
Hit count: 252
JavaScript
|extjs
someClass = Ext.extend(someClassB, {
_someFunctionC{
someButton = new Ext.button({
handler: function () {
this._onClick('click');
}
}),
_onClick(someMessage){
Ext.Msg.alert(someMessage);
}
}
}
_onClick eats one parameter; in the above code you put in the 'click' event because you want _onClick to be executed after the user clicks on the button. However, how do you specify this specific 'click' registration AND pass in a local variable as the _onClick parameter at the same time?
As an aside, why do you even have to specify 'click', when the API states that handler always pertains to a click? Is this additional information not unnecessary?
© Stack Overflow or respective owner