1. #1
    Sencha User jsveron23's Avatar
    Join Date
    Feb 2011
    Location
    Seoul, Korea
    Posts
    78
    Answers
    1
    Vote Rating
    1
    jsveron23 is on a distinguished road

      0  

    Default Unanswered: [PR4] Every times more more.......

    Unanswered: [PR4] Every times more more.......


    Code:
        pressSegBtn: function(btn) {
            console.log('1');
            var text  = btn.getText(),
                store = this.getBestList().getStore();
            
            store.clearFilter();
            console.log('2');
            store.on('refresh', function() {
                console.log('3');
            });
            console.log('4');
            store.filter('type', text);
            console.log('5');
        },
    safari console...

    스크린샷 2012-01-27 오후 5.26.22.jpg

  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Answers
    29
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Every time your pressSegBtn function is called it's adding your 'refresh' event listener again, which is why you see it logging '3' more and more often. You only have to call .on once to register your listener - after that it will always be called when the refresh event is fired.

    Usually what you should do is use .on inside a function that is only called once, like the constructor or the initialize function inside a Component. Take a look at the constructor function in examples/kitchensink/app/views/Toolbars.js in the Touch 2 SDK download for an example.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #3
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Answers
    102
    Vote Rating
    79
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    approved the thread so everyone can participate.

  4. #4
    Sencha User jsveron23's Avatar
    Join Date
    Feb 2011
    Location
    Seoul, Korea
    Posts
    78
    Answers
    1
    Vote Rating
    1
    jsveron23 is on a distinguished road

      0  

    Default


    thx.

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