1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Ljubljana
    Posts
    23
    Vote Rating
    0
    TipyTop is on a distinguished road

      0  

    Default Unanswered: Reference static in static

    Unanswered: Reference static in static


    I tried this, self, Class name.

    Example:

    statics: {
    A: 'something',
    B: className.A
    }

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    18
    Answers
    2
    Vote Rating
    2
    gruese is on a distinguished road

      0  

    Default


    How about this.self?

    EDIT: Sorry, slightly misunderstood the question. You're right, there seems to be no way of doing this because there is no object to work with at the time when the statics are evaluated. You can reference static variables in static functions though, maybe that helps:

    Code:
    statics : {
            A : 'something',
            B : function() { return this.A; }
    }
    and then later

    Code:
    console.log(My.cool.Class.B());

  3. #3
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      1  

    Default


    Code:
    Ext.define('MyClass',{
        statics: (function(){
            var str="something";
            return {
                A: str,
                B: str
            };
        })()
    })
    I write English by translator.

  4. #4
    Sencha User
    Join Date
    Aug 2012
    Posts
    18
    Answers
    2
    Vote Rating
    2
    gruese is on a distinguished road

      0  

    Default


    Well, I guess there is a way to do this after all.

    Nice one haduki

Thread Participants: 2

Tags for this Thread

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