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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar