1. #1
    Ext User
    Join Date
    Dec 2009
    Location
    Japan
    Posts
    43
    Vote Rating
    0
    ironlion is on a distinguished road

      0  

    Default [SOLVED] Toggle button's pressed parameter return an object

    [SOLVED] Toggle button's pressed parameter return an object


    [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:
    Code:
    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
    Last edited by ironlion; 5 Aug 2010 at 9:23 PM. Reason: solved

  2. #2
    Ext User
    Join Date
    Dec 2009
    Location
    Japan
    Posts
    43
    Vote Rating
    0
    ironlion is on a distinguished road

      0  

    Default


    Solved. Forget second parameter and check by first parameter.

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

Similar Threads

  1. Not load .asmx return parameter
    By Jacky0426 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 25 Apr 2010, 8:12 PM
  2. Not load .asmx return parameter
    By Jacky0426 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 25 Apr 2010, 8:07 PM
  3. Pressed Toggle State in Toolbar Button
    By Domitian in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 16 May 2007, 9:00 PM
  4. Toggle button: change button icon when pressed?
    By dbadke in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 26 Mar 2007, 7:14 AM