1. #1
    Sencha User
    Join Date
    Jan 2009
    Location
    Ottawa, ON, Canada
    Posts
    81
    Answers
    6
    Vote Rating
    1
    myExtJsUname is on a distinguished road

      0  

    Default Answered: Can I set Ext.form.Labelable.prototype.labelSeparator?

    Answered: Can I set Ext.form.Labelable.prototype.labelSeparator?


    Hello all,
    After ExtJs has loaded, I've tried setting the labelSeparator string as:
    Code:
    // default value is ":"
    Ext.form.Labelable.prototype.labelSeparator = " : ";
    Unfortunately, though, I don't find this value gets used when I add a component with a label to a Window. For example:
    Code:
                this.myTextField = Ext.create(
                    "Ext.form.field.Text"
                    ,{
                        fieldLabel: "Some label"
                    }
                );
    Will show "Some label:", not "Some label : ".

    I've checked and my first line above is definitely changing the value stored for the labelSeparator, it just isn't using it. Is there a problem with my syntax above? Where I'm writing it to? When? I'm doing it within the Application's launch function.

    BTW, I realize that I can set the labelSeparator within the config for the Ext.form.field.Text. I'm looking for a way to change them all so I don't need to worry if I miss some. And, it certainly seems like it should be possible to do this, so any ideas/pointers are welcome.

    Cheers,
    jtm

  2. Labelable is a mixin. Mixins get copied across when a class is defined, not when an instance is created, so by the time you update that value it's too late.

    Try updating the value on Ext.form.field.Base instead.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,585
    Answers
    540
    Vote Rating
    319
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Labelable is a mixin. Mixins get copied across when a class is defined, not when an instance is created, so by the time you update that value it's too late.

    Try updating the value on Ext.form.field.Base instead.

  4. #3
    Sencha User
    Join Date
    Jan 2009
    Location
    Ottawa, ON, Canada
    Posts
    81
    Answers
    6
    Vote Rating
    1
    myExtJsUname is on a distinguished road

      0  

    Default


    Perfect, skirtle!!
    Code:
    Ext.form.field.Base.prototype.labelSeparator = " : ";
    Thank you for your quick response!
    jtm

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