PDA

View Full Version : Why does my event only run once?



heidtmare
3 Aug 2007, 8:51 AM
selecting the third radio button in the following fieldset sets off the 'check' event.
the problem is it only works the first time. subsequent checking does nothing :(

simple.fieldset(
{legend: 'Options', hideLabels:true, style:'text-align:left;'},
cacheOption0 = new Ext.form.Radio({
boxLabel: 'Quick search',
name: 'cacheOption',
inputValue: 0,
checked: true
}),
cacheOption1 = new Ext.form.Radio({
boxLabel: 'Precision search',
name: 'cacheOption',
inputValue: 1,
checked: false
}),
cacheOption2 = new Ext.form.Radio({
boxLabel: 'Cache search',
name: 'cacheOption',
inputValue: 2,
checked: false
}),
cacheId = new Ext.form.TextField({
fieldLabel: 'CacheId',
name: 'cacheId',
emptyText:'Cache Id...',
width:150
}).hide()
);
cacheOption2.on('check', function(){ alert('I ONLY ALERT ONCE!!!');/*cacheId.setVisible( this.checked );*/ });

P.S. this with 1.1

3 Aug 2007, 12:02 PM
i wonder if you can you can check the state to see if it's being reset when you uncheck it.

heidtmare
7 Aug 2007, 6:17 AM
no matter what i try the "check" event will only fire once for a radiobutton, even thought the description of the check event says it will fire at all check/uncheck actions :(

SteveEisner
11 Sep 2007, 9:00 PM
I hit this today and found a lot of related threads.
The latest & greatest "fix code" as of 9/11/07:
http://extjs.com/forum/showthread.php?t=11620