1. #1
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Vote Rating
    0
    Baron89 is on a distinguished road

      0  

    Default OOP question in Extjs

    OOP question in Extjs


    Hi all,i want to call a function that defined in the other class like the code show below,how should i make it?

    Code:
    ClassA = Ext.extend(ClassAUi, {
        initComponent: function() {
            ClassA.superclass.initComponent.call(this);
            this.initActionHandler();
        },
        initActionHandler : function() {
         
         this.getAddBtn().on('click',this.onClickAddBtn, this);
         
        },
        onClickAddBtn : function(){
              //how can i call the function 'foo' that defined in classB?
       },
        getAddBtn : function(){
         
         return Ext.getCmp("classA.add");
        }
    });
    Ext.reg('ClassA',ClassA);
    Code:
    ClassB = Ext.extend(ClassBUi, {
        initComponent: function() {
            ClassB.superclass.initComponent.call(this);
            
        },
       foo : function(){
             //do something
        }
    });
    Ext.reg('ClassB',ClassB);

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    63
    Vote Rating
    0
    jorgeluislay is an unknown quantity at this point

      1  

    Default


    I think it was something with createDelegate()

    Jay Garcia explain this in some of his videos, maybe it was in this one. Just take a look, is very interesannt too: click me!

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