PDA

View Full Version : [SOLVED] Toggle button's pressed parameter return an object



ironlion
5 Aug 2010, 8:59 PM
[SOLVED]

Hello,
I have a toggle button, when it pressed, the pressed parameter gives me an object.
In according to documentation it must be boolean.

My button is here:

xtype: 'button',
enableToggle: true,
pressed: true,
text: 'Autocalc switch',
handler: function (btn, pressed) {
alert (pressed);
}

Can anyone explain it?

PS: I am using 3.2.0

ironlion
5 Aug 2010, 9:22 PM
Solved. Forget second parameter and check by first parameter.


xtype: 'button',
enableToggle: true,
pressed: true,
text: 'Autocalc switch',
handler: function (btn, pressed) {
alert (btn.pressed);
}