Question: ```
    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?

Answer: 
Another way that I've found to do this is to pass a custom config option along with your button. Say you wanted to have a `splitbutton` that could choose the amount of banners to add. (this is from a recent project)

```
{
xtype: 'splitbutton',
iconCls: 'icon addBanners',
ref: '../addBanner',
text: 'Add Banner',
menu: new Ext.menu.Menu({
    items: [{ 
        text: 'Add 10 Banners',
        scope: this,
        handler: this.addBanner,
        numBanners: 10
    },{
        text: 'Add 20 Banners',
        scope: this, 
        handler: this.addBanner,
        numBanners: 20
    }]
}),                    
scope: this,
handler: this.addBanner,
numBanners: 1
}

```

And in your function:

```
addBanner: function(button, event) {
      if (button.numBanners) {
          // do whatever 
      }
}

```
You can also create a callback function that inserts extra parameters when it is called:

```
var button = new Ext.Button({
    handler: this.someFunction.createDelegate(button,['Some message'])
});

```