javascript and extJs - scope question
<p>I got a little scope related problem with some js code, maybe somebody can explain to me what I'm making wrong:</p>

<p>I'm using extJs and got this snippet:</p>

<pre><code>Ext.onReady(function(){

 // Form for filter selection
 var formFilter = new Ext.FormPanel({
  // ...
        items: [
   cbGroup = new Ext.form.ComboBox({    
                fieldLabel: 'Group',
    store: dsGroups,
    displayField: 'name',
    valueField: 'number',
    emptyText : '- Please choose a group -',
    listeners:{
      'select': function() {
       alert(cbGroup.selectedIndex +' '+this.selectedIndex);
      }
     }
    })
   ]
    }); 
});
</code></pre>

<p>The problem:
When I access the combobox over 'this' within the listener function, I get the correct result for the selectIndex property.
When I access the combobox over it's var name, I allways get the result '-1'.
Thank a lot for your help!</p>
