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

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