1. #1
    Sencha User tomalex0's Avatar
    Join Date
    Apr 2009
    Location
    San Jose, CA
    Posts
    589
    Answers
    1
    Vote Rating
    16
    tomalex0 will become famous soon enough

      0  

    Default Answered: Slider event when setValues or setRecord is used?

    Answered: Slider event when setValues or setRecord is used?


    Is there any event fired when slider value is changed using setValues or setRecord

    change, updatedata events were not firing?
    Sencha Touch Demos

    IosToggleField Forum - Github
    Form Validation
    Forum - Github
    Iphone Settings Menu
    Forum
    Sqlite Storage & Login Manifest
    Forum
    KitchenSink MVC
    Forum - Github
    SqliteProxy-v1 Forum - Github
    SqliteProxy-v2
    Forum - Github
    Arshaw Fullcalendar Forum - Github






  2. No but with this override you can get the change event working when you do a setValue on the field:

    Code:
    Ext.define('Override.slider.Slider', {
        override : 'Ext.slider.Slider',
    
        updateValue : function(newValue, oldValue) {
            this.callOverridden([newValue, oldValue]);
    
            var changed = false,
                v       = 0,
                vNum    = newValue.length;
    
            if (oldValue) {
                for (; v < vNum; v++) {
                    if (newValue[v] !== oldValue[v]) {
                        changed = true;
                        break;
                    }
                }
            }
    
            if (changed) {
                this.fireEvent('change', this, newValue, oldValue);
            }
        }
    });
    You would have to try the setValues and setRecord on the form but it should still work.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,790
    Answers
    3465
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    No but with this override you can get the change event working when you do a setValue on the field:

    Code:
    Ext.define('Override.slider.Slider', {
        override : 'Ext.slider.Slider',
    
        updateValue : function(newValue, oldValue) {
            this.callOverridden([newValue, oldValue]);
    
            var changed = false,
                v       = 0,
                vNum    = newValue.length;
    
            if (oldValue) {
                for (; v < vNum; v++) {
                    if (newValue[v] !== oldValue[v]) {
                        changed = true;
                        break;
                    }
                }
            }
    
            if (changed) {
                this.fireEvent('change', this, newValue, oldValue);
            }
        }
    });
    You would have to try the setValues and setRecord on the form but it should still work.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User tomalex0's Avatar
    Join Date
    Apr 2009
    Location
    San Jose, CA
    Posts
    589
    Answers
    1
    Vote Rating
    16
    tomalex0 will become famous soon enough

      0  

    Default


    Hi Mitchel,

    Thanks for the help, works fine. I was trying to figure out how to override and here it is .
    It will be nice to have document on extending a component.
    Sencha Touch Demos

    IosToggleField Forum - Github
    Form Validation
    Forum - Github
    Iphone Settings Menu
    Forum
    Sqlite Storage & Login Manifest
    Forum
    KitchenSink MVC
    Forum - Github
    SqliteProxy-v1 Forum - Github
    SqliteProxy-v2
    Forum - Github
    Arshaw Fullcalendar Forum - Github






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