1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    143
    Answers
    5
    Vote Rating
    0
    rockinthesixstring is on a distinguished road

      0  

    Default Answered: How do I use setPressedButtons?

    Answered: How do I use setPressedButtons?


    I'm working with a SegmentedButton and I need to be able to reset all buttons to pressed=false after they're pressed.

    The reason for this is that I don't want a toggle button, but more of an action link kind of button... (press this, navigate to this view).

    How do I use 'setPressedButtons' to achieve this? Or is there another/better way to go about doing what I need?

  2. This should do it:

    Code:
    segmentedButton.setPressedButtons([]);

  3. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This should do it:

    Code:
    segmentedButton.setPressedButtons([]);
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #3
    Sencha User
    Join Date
    May 2011
    Posts
    143
    Answers
    5
    Vote Rating
    0
    rockinthesixstring is on a distinguished road

      0  

    Default


    Quote Originally Posted by rdougan View Post
    This should do it:

    Code:
    segmentedButton.setPressedButtons([]);
    Thanks rdougan. I tried the following and got this error

    PHP Code:
                    toggle: function(containerbuttonpressed){
                        var 
    buttonText button.getText();
                        
    console.log('User: buttonPress ~ "' buttonText '"');


                        if(
    buttonText === 'videos'){
                            
    // todo: activate the videos view
                        
    }


                        if(
    buttonText === 'calendar'){
                            
    // todo: activate the calendar view
                        
    }
                        if(
    buttonText === 'sites'){
                            
    // todo: activate the sites view
                        
    }
                        
    // reset the button pressed to false.
                        
    button.setPressedButtons([]);
                    } 

    Uncaught TypeError: Object [object Object] has no method 'setPressedButtons'

  5. #4
    Sencha User
    Join Date
    May 2011
    Posts
    143
    Answers
    5
    Vote Rating
    0
    rockinthesixstring is on a distinguished road

      0  

    Default


    Quote Originally Posted by rockinthesixstring View Post
    Thanks rdougan. I tried the following and got this error

    PHP Code:
                    toggle: function(containerbuttonpressed){
                        var 
    buttonText button.getText();
                        
    console.log('User: buttonPress ~ "' buttonText '"');


                        if(
    buttonText === 'videos'){
                            
    // todo: activate the videos view
                        
    }


                        if(
    buttonText === 'calendar'){
                            
    // todo: activate the calendar view
                        
    }
                        if(
    buttonText === 'sites'){
                            
    // todo: activate the sites view
                        
    }
                        
    // reset the button pressed to false.
                        
    button.setPressedButtons([]);
                    } 

    Uncaught TypeError: Object [object Object] has no method 'setPressedButtons'
    Ah, but the container has that method

    Code:
    container.setPressedButtons([]);

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi